nycJSorg/angular-presentation

View on GitHub

Showing 887 of 887 total issues

Function 14 has 280 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function(require, module, exports) {
        (function(process, global, __dirname) {
          /*!
           * mocha
           * Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>
Severity: Major
Found in libs/code-demos/assets/runner/js/mocha.js - About 1 day to fix

    Function 21 has 269 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          function(require, module, exports) {
            (function(global) {
              /* eslint-env browser */
    
              /**
    Severity: Major
    Found in libs/code-demos/assets/runner/js/mocha.js - About 1 day to fix

      File ng2ts.ts has 609 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      // tslint:disable:max-line-length TODO: Clean up this file and remove this comment.
      //  TODO: This should be done using require.context
      
      import { Injectable } from '@angular/core';
      import { createModuleTest } from './tests/createModuleTest';
      Severity: Major
      Found in ng2ts/ng2ts.ts - About 1 day to fix

        `` has 70 functions (exceeds 20 allowed). Consider refactoring.
        Open

          {
            1: [
              function(require, module, exports) {
                (function(process) {
                  module.exports = process.env.COV
        Severity: Major
        Found in libs/code-demos/assets/runner/js/mocha.js - About 1 day to fix

          Function 35 has 244 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                function(require, module, exports) {
                  (function(global) {
                    /**
                     * Module dependencies.
                     */
          Severity: Major
          Found in libs/code-demos/assets/runner/js/mocha.js - About 1 day to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    glider: [
                      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
                      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
                      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
                      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
            apps/kirjs/src/app/modules/cellular-automation/cellular-automation.component.ts on lines 163..178

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 230.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    oscilatorClock: [
                      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
                      [0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0],
                      [0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0],
                      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
            apps/kirjs/src/app/modules/cellular-automation/cellular-automation.component.ts on lines 180..195

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 230.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

              polls = [
                {
                  key: 'favorite',
                  type: 'choice',
                  question: 'Which framework do you use most at work?',
            Severity: Major
            Found in apps/kirjs/src/app/modules/msk/msk.component.ts and 1 other location - About 1 day to fix
            apps/lis/src/app/modules/rxjs/rxjs.component.ts on lines 17..112

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 221.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

              polls = [
                {
                  key: 'favorite',
                  type: 'choice',
                  question: 'Which framework do you use most at work?',
            Severity: Major
            Found in apps/lis/src/app/modules/rxjs/rxjs.component.ts and 1 other location - About 1 day to fix
            apps/kirjs/src/app/modules/msk/msk.component.ts on lines 9..104

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 221.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

            describe('PlaygroundComponent', () => {
              let component: PlaygroundComponent;
              let fixture: ComponentFixture<PlaygroundComponent>;
            
              beforeEach(async(() => {
            apps/codelab/src/app/codelabs/angular/playground/playground.component.spec.ts on lines 7..38

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 220.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

            describe('PlaygroundComponent', () => {
              let component: PlaygroundComponent;
              let fixture: ComponentFixture<PlaygroundComponent>;
            
              beforeEach(async(() => {
            apps/playground/src/app/playground/playground.component.spec.ts on lines 7..38

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 220.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

            export class PlaygroundComponent {
              code = angularSampleCode;
            
              constructor(
                private readonly activatedRoute: ActivatedRoute,
            Severity: Major
            Found in apps/playground/src/app/playground/playground.component.ts and 1 other location - About 1 day to fix
            apps/codelab/src/app/codelabs/angular/playground/playground.component.ts on lines 10..34

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 217.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

            export class PlaygroundComponent {
              code = angularSampleCode;
            
              constructor(
                private readonly activatedRoute: ActivatedRoute,
            apps/playground/src/app/playground/playground.component.ts on lines 10..34

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 217.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 4 locations. Consider refactoring.
            Open

                    Suite.prototype.beforeAll = function(title, fn) {
                      if (this.pending) {
                        return this;
                      }
                      if (typeof title === 'function') {
            Severity: Major
            Found in libs/code-demos/assets/runner/js/mocha.js and 3 other locations - About 1 day to fix
            libs/code-demos/assets/runner/js/mocha.js on lines 5810..5829
            libs/code-demos/assets/runner/js/mocha.js on lines 5839..5858
            libs/code-demos/assets/runner/js/mocha.js on lines 5868..5887

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 214.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 4 locations. Consider refactoring.
            Open

                    Suite.prototype.beforeEach = function(title, fn) {
                      if (this.pending) {
                        return this;
                      }
                      if (typeof title === 'function') {
            Severity: Major
            Found in libs/code-demos/assets/runner/js/mocha.js and 3 other locations - About 1 day to fix
            libs/code-demos/assets/runner/js/mocha.js on lines 5781..5800
            libs/code-demos/assets/runner/js/mocha.js on lines 5810..5829
            libs/code-demos/assets/runner/js/mocha.js on lines 5868..5887

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 214.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 4 locations. Consider refactoring.
            Open

                    Suite.prototype.afterEach = function(title, fn) {
                      if (this.pending) {
                        return this;
                      }
                      if (typeof title === 'function') {
            Severity: Major
            Found in libs/code-demos/assets/runner/js/mocha.js and 3 other locations - About 1 day to fix
            libs/code-demos/assets/runner/js/mocha.js on lines 5781..5800
            libs/code-demos/assets/runner/js/mocha.js on lines 5810..5829
            libs/code-demos/assets/runner/js/mocha.js on lines 5839..5858

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 214.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 4 locations. Consider refactoring.
            Open

                    Suite.prototype.afterAll = function(title, fn) {
                      if (this.pending) {
                        return this;
                      }
                      if (typeof title === 'function') {
            Severity: Major
            Found in libs/code-demos/assets/runner/js/mocha.js and 3 other locations - About 1 day to fix
            libs/code-demos/assets/runner/js/mocha.js on lines 5781..5800
            libs/code-demos/assets/runner/js/mocha.js on lines 5839..5858
            libs/code-demos/assets/runner/js/mocha.js on lines 5868..5887

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 214.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Function 45 has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
            Open

                  function(require, module, exports) {
                    exports.read = function(buffer, offset, isLE, mLen, nBytes) {
                      var e, m;
                      var eLen = nBytes * 8 - mLen - 1;
                      var eMax = (1 << eLen) - 1;
            Severity: Minor
            Found in libs/code-demos/assets/runner/js/mocha.js - About 1 day to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function ngOnInit has 217 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              ngOnInit() {
                this.t = extractMessages(this.translation);
            
                this.code = {
                  template: {

              Function 37 has 216 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    function(require, module, exports) {
                      /**
                       * Module dependencies.
                       */
              
              
              Severity: Major
              Found in libs/code-demos/assets/runner/js/mocha.js - About 1 day to fix
                Severity
                Category
                Status
                Source
                Language