Showing 2,859 of 2,859 total issues

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

function update (args, cb) {
  npm.commands.outdated(args, true, function (er, outdated) {
    if (er) return cb(er)

    var wanted = outdated.filter(function (ww) {
Severity: Minor
Found in deps/npm/lib/update.js - About 1 hr to fix

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

    function setCredentialsByURI (uri, c) {
      assert(uri && typeof uri === "string", "registry URL is required")
      assert(c && typeof c === "object", "credentials are required")
    
      var nerfed = toNerfDart(uri)
    Severity: Minor
    Found in deps/npm/lib/config/set-credentials-by-uri.js - About 1 hr to fix

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

        def Write(self, qualified_target, base_path, output_filename, spec, configs,
                  part_of_all):
          """The main entry point: writes a .mk file for a single target.
      
          Arguments:
      Severity: Minor
      Found in tools/gyp/pylib/gyp/generator/make.py - About 1 hr to fix

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

        def GenerateOutput(target_list, target_dicts, data, params):
          options = params['options']
          generator_flags = params.get('generator_flags', {})
          builddir_name = generator_flags.get('output_dir', 'out')
          limit_to_target_all = generator_flags.get('limit_to_target_all', False)
        Severity: Minor
        Found in tools/gyp/pylib/gyp/generator/android.py - About 1 hr to fix

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

          def Execute(arch, mode, args, options, suites, workspace):
            print(">>> Running tests for %s.%s" % (arch, mode))
          
            shell_dir = options.shell_dir
            if not shell_dir:
          Severity: Minor
          Found in deps/v8/tools/run-tests.py - About 1 hr to fix

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

            def Execute(arch, mode, args, options, suites, workspace):
              print(">>> Running tests for %s.%s" % (arch, mode))
            
              dist = Distribution(options)
            
            
            Severity: Minor
            Found in deps/v8/tools/run-deopt-fuzzer.py - About 1 hr to fix

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                      for (var j = 0; j < row.length; j++) {
                        DrawBar(offset, code_kind.color,
                                row[j].start, row[j].end, kStackFrameWidth);
                      }
              Severity: Major
              Found in deps/v8/tools/profviz/composer.js and 1 other location - About 1 hr to fix
              deps/v8/tools/profviz/composer.js on lines 484..487

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 58.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              ProtocolValue.prototype.protoObjectValue = function() {
                var proto = this.value_.protoObject;
                return this.packet_.lookup(proto.ref);
              };
              Severity: Major
              Found in deps/v8/src/d8.js and 1 other location - About 1 hr to fix
              deps/v8/src/d8.js on lines 1880..1883

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 58.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                  for (var i = 0; i < nonHostChars.length; i++) {
                    var hec = rest.indexOf(nonHostChars[i]);
                    if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
                      hostEnd = hec;
                  }
              Severity: Major
              Found in lib/url.js and 1 other location - About 1 hr to fix
              lib/url.js on lines 194..198

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 58.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                  retry : {
                    retries    : config.get("fetch-retries"),
                    factor     : config.get("fetch-retry-factor"),
                    minTimeout : config.get("fetch-retry-mintimeout"),
                    maxTimeout : config.get("fetch-retry-maxtimeout")
              Severity: Major
              Found in deps/npm/lib/cache/caching-client.js and 1 other location - About 1 hr to fix
              deps/npm/lib/cache/caching-client.js on lines 200..205

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 58.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                  ssl : {
                    certificate : config.get("cert"),
                    key         : config.get("key"),
                    ca          : config.get("ca"),
                    strict      : config.get("strict-ssl")
              Severity: Major
              Found in deps/npm/lib/cache/caching-client.js and 1 other location - About 1 hr to fix
              deps/npm/lib/cache/caching-client.js on lines 206..211

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 58.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                  for (var i = 0; i < hostEndingChars.length; i++) {
                    var hec = rest.indexOf(hostEndingChars[i]);
                    if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
                      hostEnd = hec;
                  }
              Severity: Major
              Found in lib/url.js and 1 other location - About 1 hr to fix
              lib/url.js on lines 222..226

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 58.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              ProtocolValue.prototype.constructorFunctionValue = function() {
                var ctor = this.value_.constructorFunction;
                return this.packet_.lookup(ctor.ref);
              };
              Severity: Major
              Found in deps/v8/src/d8.js and 1 other location - About 1 hr to fix
              deps/v8/src/d8.js on lines 1890..1893

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 58.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                    for (var j = 0; j < row.length; j++) {
                      DrawBar(offset, code_kind.color,
                              row[j].start, row[j].end, kExecutionFrameWidth);
                    }
              Severity: Major
              Found in deps/v8/tools/profviz/composer.js and 1 other location - About 1 hr to fix
              deps/v8/tools/profviz/composer.js on lines 493..496

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 58.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Function TickProcessor has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  cppEntriesProvider,
                  separateIc,
                  callGraphSize,
                  ignoreUnknown,
                  stateFilter,
              Severity: Major
              Found in deps/v8/tools/tickprocessor.js - About 1 hr to fix

                Function runCmd_ has 9 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) {
                Severity: Major
                Found in deps/npm/lib/utils/lifecycle.js - About 1 hr to fix

                  Function __init__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    def __init__(self, qualified_target, target_outputs, base_dir, build_dir,
                  Severity: Major
                  Found in tools/gyp/pylib/gyp/generator/ninja.py - About 1 hr to fix

                    Function _GenerateRulesForMSBuild has 9 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def _GenerateRulesForMSBuild(output_dir, options, spec,
                    Severity: Major
                    Found in tools/gyp/pylib/gyp/generator/msvs.py - About 1 hr to fix

                      Function WriteTarget has 9 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use,
                      Severity: Major
                      Found in tools/gyp/pylib/gyp/generator/cmake.py - About 1 hr to fix

                        Function __init__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          def __init__(self, short_name, description,
                        Severity: Major
                        Found in tools/gyp/pylib/gyp/MSVSVersion.py - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language