jquery/jquery

View on GitHub
external/requirejs/require.js

Summary

Maintainability
F
1 wk
Test Coverage

Function newContext has 981 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 1306 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /** vim: et:ts=4:sw=4:sts=4
     * @license RequireJS 2.3.6 Copyright jQuery Foundation and other contributors.
     * Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE
     */
    //Not using strict: uneven strict support in browsers, #392, and causes
    Severity: Major
    Found in external/requirejs/require.js - About 3 days to fix

      Function callPlugin has 96 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 configure has 73 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 check has 66 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 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 54 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 40 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 32 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 (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

                                  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.events.error && this.map.isDefine) ||
                                                                    req.onError !== defaultOnError) {
                                                                    try {
                                                                        exports = context.execCb(id, factory, depExports, exports);
                                                                    } catch (e) {
                                    Severity: Major
                                    Found in external/requirejs/require.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                  if (err) {
                                                                      err.requireMap = this.map;
                                                                      err.requireModules = this.map.isDefine ? [this.map.id] : null;
                                                                      err.requireType = this.map.isDefine ? 'define' : 'require';
                                                                      return onError((this.error = err));
                                      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

                                          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