fixjs/define.js

View on GitHub

Showing 83 of 149 total issues

Function defineModuleDefinition has 363 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function defineModuleDefinition() {
    var
      isOldOpera = typeof global.opera !== 'undefined' && global.opera.toString() === '[object Opera]',
      currentScript = document.currentScript,
      emptyArray = [],
Severity: Major
Found in build/old/define.promise.js - About 1 day to fix

    Function defineModuleDefinition has 352 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function defineModuleDefinition() {
        var
          isOldOpera = typeof global.opera !== 'undefined' && global.opera.toString() === '[object Opera]',
          currentScript = document.currentScript,
          emptyArray = [],
    Severity: Major
    Found in build/old/define.debug.js - About 1 day to fix

      Function defineModuleDefinition has 333 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function defineModuleDefinition() {
          var
            isOldOpera = typeof global.opera !== 'undefined' && global.opera.toString() === '[object Opera]',
            currentScript = document.currentScript,
            emptyArray = [],
      Severity: Major
      Found in build/old/define.js - About 1 day to fix

        File define.promise.js has 644 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * DefineJS v0.2.9 2015-04-16T23:09Z
         * Copyright (c) 2014 Mehran Hatami and define.js contributors.
         * Available via the MIT license.
         * license found at http://github.com/fixjs/define.js/raw/master/LICENSE
        Severity: Major
        Found in examples/define-promise-dev/define.promise.js - About 1 day to fix

          File define.promise.js has 644 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * DefineJS v0.2.9 2015-04-16T23:09Z
           * Copyright (c) 2014 Mehran Hatami and define.js contributors.
           * Available via the MIT license.
           * license found at http://github.com/fixjs/define.js/raw/master/LICENSE
          Severity: Major
          Found in define.promise.js - About 1 day to fix

            File define.js has 541 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /**
             * DefineJS v0.2.9 2015-04-16T23:09Z
             * Copyright (c) 2014 Mehran Hatami and define.js contributors.
             * Available via the MIT license.
             * license found at http://github.com/fixjs/define.js/raw/master/LICENSE
            Severity: Major
            Found in examples/define-module-mapping/define.js - About 1 day to fix

              File define.js has 541 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /**
               * DefineJS v0.2.9 2015-04-16T23:09Z
               * Copyright (c) 2014 Mehran Hatami and define.js contributors.
               * Available via the MIT license.
               * license found at http://github.com/fixjs/define.js/raw/master/LICENSE
              Severity: Major
              Found in define.js - About 1 day to fix

                File define.js has 541 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /**
                 * DefineJS v0.2.9 2015-04-16T23:09Z
                 * Copyright (c) 2014 Mehran Hatami and define.js contributors.
                 * Available via the MIT license.
                 * license found at http://github.com/fixjs/define.js/raw/master/LICENSE
                Severity: Major
                Found in examples/rjs-amd-optimizer/define.js - About 1 day to fix

                  File define.js has 541 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /**
                   * DefineJS v0.2.9 2015-04-16T23:09Z
                   * Copyright (c) 2014 Mehran Hatami and define.js contributors.
                   * Available via the MIT license.
                   * license found at http://github.com/fixjs/define.js/raw/master/LICENSE
                  Severity: Major
                  Found in examples/simple-promised-module/define.js - About 1 day to fix

                    File define.js has 541 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /**
                     * DefineJS v0.2.9 2015-04-16T23:09Z
                     * Copyright (c) 2014 Mehran Hatami and define.js contributors.
                     * Available via the MIT license.
                     * license found at http://github.com/fixjs/define.js/raw/master/LICENSE
                    Severity: Major
                    Found in examples/definejs-promised-modules/define.js - About 1 day to fix

                      File define.js has 541 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /**
                       * DefineJS v0.2.9 2015-04-16T23:09Z
                       * Copyright (c) 2014 Mehran Hatami and define.js contributors.
                       * Available via the MIT license.
                       * license found at http://github.com/fixjs/define.js/raw/master/LICENSE
                      Severity: Major
                      Found in examples/regular-amd-style/define.js - About 1 day to fix

                        Function 4 has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
                        Open

                          4: [ function(require, module, exports) {
                            (function(process) {
                              var head = {
                                task: void 0,
                                next: null
                        Severity: Minor
                        Found in polyfills/promise-6.1.0.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

                        File define.promise.js has 449 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /**
                         * DefineJS v0.2.31
                         * Copyright (c) 2014 Mehran Hatami and define.js contributors.
                         * Available via the MIT license.
                         * license found at http://github.com/fixjs/define.js/raw/master/LICENSE
                        Severity: Minor
                        Found in build/old/define.promise.js - About 6 hrs to fix

                          Function exports has 139 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          module.exports = function (grunt) {
                            'use strict';
                          
                            var examples = [
                              'regular-amd-style',
                          Severity: Major
                          Found in Gruntfile.js - About 5 hrs to fix

                            File define.debug.js has 392 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            /**
                             * DefineJS v0.2.31
                             * Copyright (c) 2014 Mehran Hatami and define.js contributors.
                             * Available via the MIT license.
                             * license found at http://github.com/fixjs/define.js/raw/master/LICENSE
                            Severity: Minor
                            Found in build/old/define.debug.js - About 5 hrs to fix

                              File promise-6.1.0.js has 375 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: Minor
                              Found in polyfills/promise-6.1.0.js - About 5 hrs to fix

                                Function 2 has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  2: [ function(require, module, exports) {
                                    "use strict";
                                    var asap = require("asap");
                                    module.exports = Promise;
                                    function Promise(fn) {
                                Severity: Minor
                                Found in polyfills/promise-6.1.0.js - About 4 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

                                File define.js has 368 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                /**
                                 * DefineJS v0.2.31
                                 * Copyright (c) 2014 Mehran Hatami and define.js contributors.
                                 * Available via the MIT license.
                                 * license found at http://github.com/fixjs/define.js/raw/master/LICENSE
                                Severity: Minor
                                Found in build/old/define.js - About 4 hrs to fix

                                  Function 3 has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                    3: [ function(require, module, exports) {
                                      "use strict";
                                      var Promise = require("./core.js");
                                      var asap = require("asap");
                                      module.exports = Promise;
                                  Severity: Minor
                                  Found in polyfills/promise-6.1.0.js - About 4 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 3 has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    3: [ function(require, module, exports) {
                                      "use strict";
                                      var Promise = require("./core.js");
                                      var asap = require("asap");
                                      module.exports = Promise;
                                  Severity: Major
                                  Found in polyfills/promise-6.1.0.js - About 3 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language