Showing 2,859 of 2,859 total issues

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

exports.format = function(f) {
  if (!isString(f)) {
    var objects = [];
    for (var i = 0; i < arguments.length; i++) {
      objects.push(inspect(arguments[i]));
Severity: Minor
Found in lib/util.js - About 1 hr to fix

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

    function formatObject_(value, include_properties) {
      var result = '';
      result += formatHandleReference_(value);
      result += ', type: object';
      result += ', constructor ';
    Severity: Minor
    Found in deps/v8/src/d8.js - About 1 hr to fix

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

      Benchmark.prototype._run = function() {
        if (this.config)
          return this.fn(this.config);
      
        // one more more options weren't set.
      Severity: Minor
      Found in benchmark/common.js - About 1 hr to fix

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

        function TLSSocket(socket, options) {
          // Disallow wrapping TLSSocket in TLSSocket
          assert(!(socket instanceof TLSSocket));
        
          net.Socket.call(this, {
        Severity: Minor
        Found in lib/_tls_wrap.js - About 1 hr to fix

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

          function addNameRange (name, range, data, cb) {
            range = semver.validRange(range, true)
            if (range === null) return cb(new Error(
              "Invalid version range: " + range
            ))
          Severity: Minor
          Found in deps/npm/lib/cache/add-named.js - About 1 hr to fix

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

              Object.defineProperty(npm.commands, c, { get : function () {
                if (!loaded) throw new Error(
                  "Call npm.load(config, cb) before using this command.\n"+
                  "See the README.md or cli.js for example usage.")
                var a = npm.deref(c)
            Severity: Minor
            Found in deps/npm/lib/npm.js - About 1 hr to fix

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

              function installManyTop_ (what, where, context, cb) {
                var nm = path.resolve(where, "node_modules")
              
                fs.readdir(nm, function (er, pkgs) {
                  if (er) return installMany(what, where, context, cb)
              Severity: Minor
              Found in deps/npm/lib/install.js - About 1 hr to fix

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

                exports.inflateRaw = function(buffer, opts, callback) {
                  if (util.isFunction(opts)) {
                    callback = opts;
                    opts = {};
                  }
                Severity: Major
                Found in lib/zlib.js and 5 other locations - About 1 hr to fix
                lib/zlib.js on lines 129..135
                lib/zlib.js on lines 141..147
                lib/zlib.js on lines 153..159
                lib/zlib.js on lines 165..171
                lib/zlib.js on lines 177..183

                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 62.

                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 6 locations. Consider refactoring.
                Open

                exports.gzip = function(buffer, opts, callback) {
                  if (util.isFunction(opts)) {
                    callback = opts;
                    opts = {};
                  }
                Severity: Major
                Found in lib/zlib.js and 5 other locations - About 1 hr to fix
                lib/zlib.js on lines 141..147
                lib/zlib.js on lines 153..159
                lib/zlib.js on lines 165..171
                lib/zlib.js on lines 177..183
                lib/zlib.js on lines 189..195

                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 62.

                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 6 locations. Consider refactoring.
                Open

                exports.gunzip = function(buffer, opts, callback) {
                  if (util.isFunction(opts)) {
                    callback = opts;
                    opts = {};
                  }
                Severity: Major
                Found in lib/zlib.js and 5 other locations - About 1 hr to fix
                lib/zlib.js on lines 129..135
                lib/zlib.js on lines 141..147
                lib/zlib.js on lines 153..159
                lib/zlib.js on lines 165..171
                lib/zlib.js on lines 189..195

                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 62.

                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 < n - 1; i++) {
                    if (dests.at(i).value != i * 5 + 1000)
                      alert("Projection 3 failed");
                  }
                Severity: Major
                Found in deps/v8/benchmarks/deltablue.js and 1 other location - About 1 hr to fix
                deps/v8/benchmarks/deltablue.js on lines 856..859

                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 62.

                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 6 locations. Consider refactoring.
                Open

                exports.inflate = function(buffer, opts, callback) {
                  if (util.isFunction(opts)) {
                    callback = opts;
                    opts = {};
                  }
                Severity: Major
                Found in lib/zlib.js and 5 other locations - About 1 hr to fix
                lib/zlib.js on lines 129..135
                lib/zlib.js on lines 141..147
                lib/zlib.js on lines 153..159
                lib/zlib.js on lines 177..183
                lib/zlib.js on lines 189..195

                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 62.

                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 6 locations. Consider refactoring.
                Open

                exports.deflateRaw = function(buffer, opts, callback) {
                  if (util.isFunction(opts)) {
                    callback = opts;
                    opts = {};
                  }
                Severity: Major
                Found in lib/zlib.js and 5 other locations - About 1 hr to fix
                lib/zlib.js on lines 129..135
                lib/zlib.js on lines 153..159
                lib/zlib.js on lines 165..171
                lib/zlib.js on lines 177..183
                lib/zlib.js on lines 189..195

                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 62.

                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 < n - 1; i++) {
                    if (dests.at(i).value != i * 5 + 2000)
                      alert("Projection 4 failed");
                  }
                Severity: Major
                Found in deps/v8/benchmarks/deltablue.js and 1 other location - About 1 hr to fix
                deps/v8/benchmarks/deltablue.js on lines 851..854

                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 62.

                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 6 locations. Consider refactoring.
                Open

                exports.unzip = function(buffer, opts, callback) {
                  if (util.isFunction(opts)) {
                    callback = opts;
                    opts = {};
                  }
                Severity: Major
                Found in lib/zlib.js and 5 other locations - About 1 hr to fix
                lib/zlib.js on lines 129..135
                lib/zlib.js on lines 141..147
                lib/zlib.js on lines 165..171
                lib/zlib.js on lines 177..183
                lib/zlib.js on lines 189..195

                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 62.

                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

                Consider simplifying this complex logical expression.
                Open

                  if (cb) {
                    this._reqCallbacks.splice(index, 1);
                    handled = true;
                
                    var err = res.success === false && (res.message || true) ||
                Severity: Critical
                Found in lib/_debugger.js - About 1 hr to fix

                  Identical blocks of code found in 3 locations. Consider refactoring.
                  Open

                    for root in suite_paths:
                      suite = testsuite.TestSuite.LoadTestSuite(
                          os.path.join(workspace, "test", root))
                      if suite:
                        suites.append(suite)
                  Severity: Major
                  Found in deps/v8/tools/run-tests.py and 2 other locations - About 1 hr to fix
                  deps/v8/tools/run-deopt-fuzzer.py on lines 310..314
                  deps/v8/tools/testrunner/network/endpoint.py on lines 92..96

                  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 42.

                  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

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

                  def CallGenerateOutputForConfig(arglist):
                    # Ignore the interrupt signal so that the parent process catches it and
                    # kills all multiprocessing children.
                    signal.signal(signal.SIGINT, signal.SIG_IGN)
                  
                  
                  Severity: Major
                  Found in tools/gyp/pylib/gyp/generator/cmake.py and 1 other location - About 1 hr to fix
                  tools/gyp/pylib/gyp/generator/ninja.py on lines 2111..2117

                  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 42.

                  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

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

                  def CallGenerateOutputForConfig(arglist):
                    # Ignore the interrupt signal so that the parent process catches it and
                    # kills all multiprocessing children.
                    signal.signal(signal.SIGINT, signal.SIG_IGN)
                  
                  
                  Severity: Major
                  Found in tools/gyp/pylib/gyp/generator/ninja.py and 1 other location - About 1 hr to fix
                  tools/gyp/pylib/gyp/generator/cmake.py on lines 1113..1119

                  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 42.

                  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

                  Identical blocks of code found in 3 locations. Consider refactoring.
                  Open

                    for root in suite_paths:
                      suite = testsuite.TestSuite.LoadTestSuite(
                          os.path.join(workspace, "test", root))
                      if suite:
                        suites.append(suite)
                  Severity: Major
                  Found in deps/v8/tools/testrunner/network/endpoint.py and 2 other locations - About 1 hr to fix
                  deps/v8/tools/run-deopt-fuzzer.py on lines 310..314
                  deps/v8/tools/run-tests.py on lines 426..430

                  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 42.

                  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

                  Severity
                  Category
                  Status
                  Source
                  Language