Reactive-Extensions/RxJS

View on GitHub
examples/requirejs/js/lib/require.js

Summary

Maintainability
F
1 wk
Test Coverage

Showing 19 of 19 total issues

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

function newContext(contextName) {
var inCheckLoaded, Module, context, handlers,
checkLoadedTimeoutId,
config = {
waitSeconds: 7,
Severity: Major
Found in examples/requirejs/js/lib/require.js - About 4 days to fix

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

    /** vim: et:ts=4:sw=4:sts=4
    * @license RequireJS 2.0.6 Copyright (c) 2010-2012, 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 examples/requirejs/js/lib/require.js - About 3 days to fix

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

      callPlugin: function () {
      var map = this.map,
      id = map.id,
      pluginMap = makeModuleMap(map.prefix, null, false, true);
       
       
      Severity: Major
      Found in examples/requirejs/js/lib/require.js - About 2 hrs to fix

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

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

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

          function checkLoaded() {
          var map, modId, 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 examples/requirejs/js/lib/require.js - About 2 hrs to fix

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

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

              Function configure has 51 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 examples/requirejs/js/lib/require.js - About 2 hrs to fix

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

                function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {
                var url, pluginModule, suffix,
                index = name ? name.indexOf('!') : -1,
                prefix = null,
                parentName = parentModuleMap ? parentModuleMap.name : null,
                Severity: Minor
                Found in examples/requirejs/js/lib/require.js - About 1 hr to fix

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

                  enable: function () {
                  this.enabled = true;
                   
                  if (!this.waitPushed) {
                  waitAry.push(this);
                  Severity: Minor
                  Found in examples/requirejs/js/lib/require.js - About 1 hr to fix

                    Function require has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    require: function (deps, callback, errback, relMap) {
                    var moduleName, id, map, requireMod, args;
                    if (typeof deps === 'string') {
                    if (isFunction(callback)) {
                    //Invalid call
                    Severity: Minor
                    Found in examples/requirejs/js/lib/require.js - About 1 hr to fix

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

                      nameToUrl: function (moduleName, ext) {
                      var paths, pkgs, pkg, pkgPath, syms, i, parentModule, url,
                      parentPath;
                       
                      //If a colon is in the URL, it indicates a protocol is used and it is just
                      Severity: Minor
                      Found in examples/requirejs/js/lib/require.js - About 1 hr to fix

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

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

                          Function load has 33 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 examples/requirejs/js/lib/require.js - About 1 hr to fix

                            Function forceExec has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function forceExec(mod, traced, uninited) {
                            var id = mod.map.id,
                            depArray = mod.depMaps;
                             
                            if (!mod.inited || !mod.map.isDefine) {
                            Severity: Minor
                            Found in examples/requirejs/js/lib/require.js - About 1 hr to fix

                              Avoid deeply nested control flow statements.
                              Open

                              if (moduleName === pkg.name) {
                              pkgPath = pkg.location + '/' + pkg.main;
                              } else {
                              pkgPath = pkg.location;
                              }
                              Severity: Major
                              Found in examples/requirejs/js/lib/require.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

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

                                  Avoid deeply nested control flow statements.
                                  Open

                                  if (cjsModule &&
                                  cjsModule.exports !== undefined &&
                                  //Make sure it is not already the exports value
                                  cjsModule.exports !== this.exports) {
                                  exports = cjsModule.exports;
                                  Severity: Major
                                  Found in examples/requirejs/js/lib/require.js - About 45 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                    return context.require;
                                    Severity: Major
                                    Found in examples/requirejs/js/lib/require.js - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                      return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1]));
                                      Severity: Major
                                      Found in examples/requirejs/js/lib/require.js - About 30 mins to fix

                                        There are no issues that match your filters.

                                        Category
                                        Status