jquery/jquery

View on GitHub
external/requirejs/require.js

Summary

Maintainability
F
1 wk
Test Coverage

Function newContext has 976 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function newContext(contextName) {
        var inCheckLoaded, Module, context, handlers,
            checkLoadedTimeoutId,
            config = {
                //Defaults. Do not set a default for map
Severity: Major
Found in external/requirejs/require.js - About 4 days to fix

    File require.js has 1298 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /** vim: et:ts=4:sw=4:sts=4
     * @license RequireJS 2.1.22 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.
     * Available via the MIT or new BSD license.
     * see: http://github.com/jrburke/requirejs for details
     */
    Severity: Major
    Found in external/requirejs/require.js - About 3 days to fix

      Function callPlugin has 95 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  callPlugin: function () {
                      var map = this.map,
                          id = map.id,
                          //Map already normalized the prefix.
                          pluginMap = makeModuleMap(map.prefix);
      Severity: Major
      Found in external/requirejs/require.js - About 3 hrs to fix

        Function makeRequire has 86 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    makeRequire: function (relMap, options) {
                        options = options || {};
        
                        function localRequire(deps, callback, errback) {
                            var id, map, requireMod;
        Severity: Major
        Found in external/requirejs/require.js - About 3 hrs to fix

          Function check has 69 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      check: function () {
                          if (!this.enabled || this.enabling) {
                              return;
                          }
          
          
          Severity: Major
          Found in external/requirejs/require.js - About 2 hrs to fix

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

                        configure: function (cfg) {
                            //Make sure the baseUrl ends in a slash.
                            if (cfg.baseUrl) {
                                if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {
                                    cfg.baseUrl += '/';
            Severity: Major
            Found in external/requirejs/require.js - About 2 hrs to fix

              Function checkLoaded has 56 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      function checkLoaded() {
                          var err, usingPathFallback,
                              waitInterval = config.waitSeconds * 1000,
                              //It is possible to disable the wait interval by using waitSeconds of 0.
                              expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),
              Severity: Major
              Found in external/requirejs/require.js - About 2 hrs to fix

                Function makeModuleMap has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {
                            var url, pluginModule, suffix, nameParts,
                                prefix = null,
                                parentName = parentModuleMap ? parentModuleMap.name : null,
                                originalName = name,
                Severity: Major
                Found in external/requirejs/require.js - About 2 hrs to fix

                  Function normalize has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          function normalize(name, baseName, applyMap) {
                              var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,
                                  foundMap, foundI, foundStarMap, starI, normalizedBaseParts,
                                  baseParts = (baseName && baseName.split('/')),
                                  map = config.map,
                  Severity: Major
                  Found in external/requirejs/require.js - About 2 hrs to fix

                    Function enable has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                enable: function () {
                                    enabledRegistry[this.map.id] = this;
                                    this.enabled = true;
                    
                                    //Set flag mentioning that the module is enabling,
                    Severity: Minor
                    Found in external/requirejs/require.js - About 1 hr to fix

                      Function load has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          req.load = function (context, moduleName, url) {
                              var config = (context && context.config) || {},
                                  node;
                              if (isBrowser) {
                                  //In the browser so use a script tag
                      Severity: Minor
                      Found in external/requirejs/require.js - About 1 hr to fix

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

                                        function localRequire(deps, callback, errback) {
                                            var id, map, requireMod;
                        
                                            if (options.enableBuildCallback && callback && isFunction(callback)) {
                                                callback.__requireJsBuild = true;
                        Severity: Minor
                        Found in external/requirejs/require.js - About 1 hr to fix

                          Function completeLoad has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      completeLoad: function (moduleName) {
                                          var found, args, mod,
                                              shim = getOwn(config.shim, moduleName) || {},
                                              shExports = shim.exports;
                          
                          
                          Severity: Minor
                          Found in external/requirejs/require.js - About 1 hr to fix

                            Function nameToUrl has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                        nameToUrl: function (moduleName, ext, skipExt) {
                                            var paths, syms, i, parentModule, url,
                                                parentPath, bundleId,
                                                pkgMain = getOwn(config.pkgs, moduleName);
                            
                            
                            Severity: Minor
                            Found in external/requirejs/require.js - About 1 hr to fix

                              Function fromText has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                                  load.fromText = bind(this, function (text, textAlt) {
                                                      /*jslint evil: true */
                                                      var moduleName = map.name,
                                                          moduleMap = makeModuleMap(moduleName),
                                                          hasInteractive = useInteractive;
                              Severity: Minor
                              Found in external/requirejs/require.js - About 1 hr to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                            if (mapValue) {
                                                                mapValue = getOwn(mapValue, nameSegment);
                                                                if (mapValue) {
                                                                    //Match, update name to the new value.
                                                                    foundMap = mapValue;
                                Severity: Major
                                Found in external/requirejs/require.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                              if (this.map.isDefine && exports === undefined) {
                                                                  cjsModule = this.module;
                                                                  if (cjsModule) {
                                                                      exports = cjsModule.exports;
                                                                  } else if (this.usingExports) {
                                  Severity: Major
                                  Found in external/requirejs/require.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                if (err) {
                                                                    // If there is an error listener, favor passing
                                                                    // to that instead of throwing an error. However,
                                                                    // only do it for define()'d  modules. require
                                                                    // errbacks should not be called for failures in
                                    Severity: Major
                                    Found in external/requirejs/require.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                  if (req.onResourceLoad) {
                                                                      var resLoadMaps = [];
                                                                      each(this.depMaps, function (depMap) {
                                                                          resLoadMaps.push(depMap.normalizedMap || depMap);
                                                                      });
                                      Severity: Major
                                      Found in external/requirejs/require.js - About 45 mins to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                                            if (deepStringMixin && typeof value === 'object' && value &&
                                                                !isArray(value) && !isFunction(value) &&
                                                                !(value instanceof RegExp)) {
                                        
                                                                if (!target[prop]) {
                                        Severity: Major
                                        Found in external/requirejs/require.js - About 40 mins to fix

                                          Avoid too many return statements within this function.
                                          Open

                                                              return localRequire;
                                          Severity: Major
                                          Found in external/requirejs/require.js - About 30 mins to fix

                                            Avoid too many return statements within this function.
                                            Open

                                                                    return defined[id];
                                            Severity: Major
                                            Found in external/requirejs/require.js - About 30 mins to fix

                                              There are no issues that match your filters.

                                              Category
                                              Status