karma-runner/karma

View on GitHub

Showing 193 of 258 total issues

Function 8 has 1315 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"./reversed.json":8,"punycode":10}],8:[function(require,module,exports){
module.exports={
    "9": "Tab;",
    "10": "NewLine;",
    "33": "excl;",
Severity: Major
Found in static/context.js - About 6 days to fix

    Function 10 has 1315 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{"./reversed.json":10,"punycode":12}],10:[function(require,module,exports){
    module.exports={
        "9": "Tab;",
        "10": "NewLine;",
        "33": "excl;",
    Severity: Major
    Found in static/karma.js - About 6 days to fix

      File karma.js has 2357 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
      module.exports = {
        VERSION: '%KARMA_VERSION%',
        KARMA_URL_ROOT: '%KARMA_URL_ROOT%',
        KARMA_PROXY_PATH: '%KARMA_PROXY_PATH%',
      Severity: Major
      Found in static/karma.js - About 6 days to fix

        File context.js has 2149 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
        var serialize = null
        try {
          serialize = require('dom-serialize')
        } catch (e) {
        Severity: Major
        Found in static/context.js - About 5 days to fix

          Function 12 has a Cognitive Complexity of 224 (exceeds 5 allowed). Consider refactoring.
          Open

          },{}],12:[function(require,module,exports){
          (function (global){
          /*! https://mths.be/punycode v1.4.1 by @mathias */
          ;(function(root) {
          
          
          Severity: Minor
          Found in static/karma.js - About 4 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 10 has a Cognitive Complexity of 224 (exceeds 5 allowed). Consider refactoring.
          Open

          },{}],10:[function(require,module,exports){
          (function (global){
          /*! https://mths.be/punycode v1.4.1 by @mathias */
          ;(function(root) {
          
          
          Severity: Minor
          Found in static/context.js - About 4 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 2 has a Cognitive Complexity of 131 (exceeds 5 allowed). Consider refactoring.
          Open

          },{}],2:[function(require,module,exports){
          var stringify = require('../common/stringify')
          var constant = require('./constants')
          var util = require('../common/util')
          
          
          Severity: Minor
          Found in static/karma.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

          Function Karma has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring.
          Open

          function Karma (updater, socket, iframe, opener, navigator, location, document) {
            this.updater = updater
            var startEmitted = false
            var self = this
            var queryParams = util.parseQueryParams(location.search)
          Severity: Minor
          Found in client/karma.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 11 has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring.
          Open

          },{}],11:[function(require,module,exports){
          'use strict';
          
          var hasOwn = Object.prototype.hasOwnProperty;
          var toStr = Object.prototype.toString;
          Severity: Minor
          Found in static/karma.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 9 has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring.
          Open

          },{}],9:[function(require,module,exports){
          'use strict';
          
          var hasOwn = Object.prototype.hasOwnProperty;
          var toStr = Object.prototype.toString;
          Severity: Minor
          Found in static/context.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 12 has 290 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          },{}],12:[function(require,module,exports){
          (function (global){
          /*! https://mths.be/punycode v1.4.1 by @mathias */
          ;(function(root) {
          
          
          Severity: Major
          Found in static/karma.js - About 1 day to fix

            Function 10 has 290 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            },{}],10:[function(require,module,exports){
            (function (global){
            /*! https://mths.be/punycode v1.4.1 by @mathias */
            ;(function(root) {
            
            
            Severity: Major
            Found in static/context.js - About 1 day to fix

              Function 1 has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
              Open

              (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
              var serialize = null
              try {
                serialize = require('dom-serialize')
              } catch (e) {
              Severity: Minor
              Found in static/context.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 5 has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring.
              Open

              },{"./constants":1}],5:[function(require,module,exports){
              var serialize = null
              try {
                serialize = require('dom-serialize')
              } catch (e) {
              Severity: Minor
              Found in static/karma.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 2 has 235 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              },{}],2:[function(require,module,exports){
              var stringify = require('../common/stringify')
              var constant = require('./constants')
              var util = require('../common/util')
              
              
              Severity: Major
              Found in static/karma.js - About 1 day to fix

                Function Karma has 229 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function Karma (updater, socket, iframe, opener, navigator, location, document) {
                  this.updater = updater
                  var startEmitted = false
                  var self = this
                  var queryParams = util.parseQueryParams(location.search)
                Severity: Major
                Found in static/karma.js - About 1 day to fix

                  Function Karma has 229 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function Karma (updater, socket, iframe, opener, navigator, location, document) {
                    this.updater = updater
                    var startEmitted = false
                    var self = this
                    var queryParams = util.parseQueryParams(location.search)
                  Severity: Major
                  Found in client/karma.js - About 1 day to fix

                    Function stringify has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function stringify (obj, depth) {
                      if (depth === 0) {
                        return '...'
                      }
                    
                    
                    Severity: Minor
                    Found in common/stringify.js - About 7 hrs 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 parseConfig has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function parseConfig (configFilePath, cliOptions, parseOptions) {
                      const promiseConfig = parseOptions && parseOptions.promiseConfig === true
                      const throwErrors = parseOptions && parseOptions.throwErrors === true
                      const shouldSetupLoggerEarly = promiseConfig
                      if (shouldSetupLoggerEarly) {
                    Severity: Minor
                    Found in lib/config.js - About 7 hrs 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 6 has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
                    Open

                    },{}],6:[function(require,module,exports){
                    
                    /**
                     * Module dependencies.
                     */
                    Severity: Minor
                    Found in static/context.js - About 6 hrs 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

                    Severity
                    Category
                    Status
                    Source
                    Language