nycJSorg/angular-presentation

View on GitHub

Showing 887 of 887 total issues

File mocha.js has 9059 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function e(t, n, r) {
  function s(o, u) {
    if (!n[o]) {
      if (!t[o]) {
        var a = typeof require == 'function' && require;
Severity: Major
Found in libs/code-demos/assets/runner/js/mocha.js - About 3 wks to fix

    Function 43 has a Cognitive Complexity of 674 (exceeds 5 allowed). Consider refactoring.
    Open

          function(require, module, exports) {
            /*!
             * The buffer module from node.js, for the browser.
             *
             * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
    Severity: Minor
    Found in libs/code-demos/assets/runner/js/mocha.js - About 1 wk 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 55 has a Cognitive Complexity of 392 (exceeds 5 allowed). Consider refactoring.
    Open

          function(require, module, exports) {
            (function(process) {
              // Copyright Joyent, Inc. and other Node contributors.
              //
              // Permission is hereby granted, free of charge, to any person obtaining a
    Severity: Minor
    Found in libs/code-demos/assets/runner/js/mocha.js - About 1 wk 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 43 has 1426 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          function(require, module, exports) {
            /*!
             * The buffer module from node.js, for the browser.
             *
             * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
    Severity: Major
    Found in libs/code-demos/assets/runner/js/mocha.js - About 1 wk to fix

      Function 67 has a Cognitive Complexity of 312 (exceeds 5 allowed). Consider refactoring.
      Open

            function(require, module, exports) {
              /* See LICENSE file for terms of use */
      
              /*
               * Text diff implementation.
      Severity: Minor
      Found in libs/code-demos/assets/runner/js/mocha.js - About 6 days 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 66 has a Cognitive Complexity of 273 (exceeds 5 allowed). Consider refactoring.
      Open

            function(require, module, exports) {
              (function(process, global) {
                // Copyright Joyent, Inc. and other Node contributors.
                //
                // Permission is hereby granted, free of charge, to any person obtaining a
      Severity: Minor
      Found in libs/code-demos/assets/runner/js/mocha.js - About 5 days 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 getWatCompletionItems has 907 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function getWatCompletionItems() {
        const keyword = CompletionItemKind.Keyword;
        if (completionItems) {
          return completionItems;
        }
      Severity: Major
      Found in apps/kirjs/src/app/modules/webassembly/monaco-wat.ts - About 4 days to fix

        Function 36 has a Cognitive Complexity of 192 (exceeds 5 allowed). Consider refactoring.
        Open

              function(require, module, exports) {
                (function(process, global) {
                  /**
                   * Module dependencies.
                   */
        Severity: Minor
        Found in libs/code-demos/assets/runner/js/mocha.js - About 3 days 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 39 has a Cognitive Complexity of 176 (exceeds 5 allowed). Consider refactoring.
        Open

              function(require, module, exports) {
                (function(process, Buffer) {
                  /* eslint-env browser */
        
                  /**
        Severity: Minor
        Found in libs/code-demos/assets/runner/js/mocha.js - About 3 days 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

        File monaco-wat.ts has 1254 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /* Copyright 2018 Mozilla Foundation
         *
         * Permission is hereby granted, free of charge, to any person obtaining a copy
         * of this software and associated documentation files (the 'Software'), to deal
         * in the Software without restriction, including without limitation the rights
        Severity: Major
        Found in apps/kirjs/src/app/modules/webassembly/monaco-wat.ts - About 3 days to fix

          Function 67 has 621 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                function(require, module, exports) {
                  /* See LICENSE file for terms of use */
          
                  /*
                   * Text diff implementation.
          Severity: Major
          Found in libs/code-demos/assets/runner/js/mocha.js - About 3 days to fix

            Function 55 has 600 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  function(require, module, exports) {
                    (function(process) {
                      // Copyright Joyent, Inc. and other Node contributors.
                      //
                      // Permission is hereby granted, free of charge, to any person obtaining a
            Severity: Major
            Found in libs/code-demos/assets/runner/js/mocha.js - About 3 days to fix

              Function 57 has a Cognitive Complexity of 137 (exceeds 5 allowed). Consider refactoring.
              Open

                    function(require, module, exports) {
                      (function(process) {
                        // Copyright Joyent, Inc. and other Node contributors.
                        //
                        // Permission is hereby granted, free of charge, to any person obtaining a
              Severity: Minor
              Found in libs/code-demos/assets/runner/js/mocha.js - About 2 days 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

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

              function bin6BitsToDec(bin) {
                switch (bin) {
                  case '000000':
                    return 0;
                  case '000001':
              apps/kirjs/src/app/modules/ast/samples/dec-to-bin.js on lines 1..132

              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 461.

              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

              function bin6BitsToDec(bin) {
                switch (bin) {
                  case '000000':
                    return 0;
                  case '000001':
              Severity: Major
              Found in apps/kirjs/src/app/modules/ast/samples/dec-to-bin.js and 1 other location - About 2 days to fix
              apps/kirjs/src/app/modules/ast/samples/dec-to-bin-with-semicolons.js on lines 1..132

              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 461.

              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 66 has 529 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    function(require, module, exports) {
                      (function(process, global) {
                        // Copyright Joyent, Inc. and other Node contributors.
                        //
                        // Permission is hereby granted, free of charge, to any person obtaining a
              Severity: Major
              Found in libs/code-demos/assets/runner/js/mocha.js - About 2 days to fix

                Function 36 has 518 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  Function 47 has a Cognitive Complexity of 125 (exceeds 5 allowed). Consider refactoring.
                  Open

                        function(require, module, exports) {
                          // Copyright Joyent, Inc. and other Node contributors.
                          //
                          // Permission is hereby granted, free of charge, to any person obtaining a
                          // copy of this software and associated documentation files (the
                  Severity: Minor
                  Found in libs/code-demos/assets/runner/js/mocha.js - About 2 days 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

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

                    levels: Record<string, Level> = {
                      push: {
                        functions: [
                          {
                            inputs: '',
                  Severity: Major
                  Found in apps/kirjs/src/app/modules/stack/stack.component.ts and 1 other location - About 2 days to fix
                  apps/kirjs/src/app/modules/webassembly/webassembly.component.ts on lines 354..475

                  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 412.

                  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

                    levels: Record<string, Level> = {
                      push: {
                        functions: [
                          {
                            inputs: '',
                  apps/kirjs/src/app/modules/stack/stack.component.ts on lines 12..133

                  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 412.

                  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

                  Severity
                  Category
                  Status
                  Source
                  Language