Showing 2,859 of 2,859 total issues

Function Socket has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function Socket(options) {
  if (!(this instanceof Socket)) return new Socket(options);

  this._connecting = false;
  this._hadError = false;
Severity: Minor
Found in lib/net.js - About 1 hr to fix

    Function _destroy has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Socket.prototype._destroy = function(exception, cb) {
      debug('destroy');
    
      var self = this;
    
    
    Severity: Minor
    Found in lib/net.js - About 1 hr to fix

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

      Url.prototype.format = function() {
        var auth = this.auth || '';
        if (auth) {
          auth = encodeURIComponent(auth);
          auth = auth.replace(/%3A/i, ':');
      Severity: Minor
      Found in lib/url.js - About 1 hr to fix

        Function write has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        StringDecoder.prototype.write = function(buffer) {
          var charStr = '';
          // if our last write ended with an incomplete multibyte character
          while (this.charLength) {
            // determine how many remaining bytes this buffer has to offer for this char
        Severity: Minor
        Found in lib/string_decoder.js - About 1 hr to fix

          Function exports has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          module.exports = function (args, cb) {
          var s = process.platform === "win32" ? " *" : " \u2605"
            , f = "\uFF0F"
            , b = "\uFF3C"
            , x = process.platform === "win32" ? " " : ""
          Severity: Minor
          Found in deps/npm/lib/xmas.js - About 1 hr to fix

            Function plotWorker has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function plotWorker() {
              var worker = null;
            
              function initialize() {
                ui.freeze();
            Severity: Minor
            Found in deps/v8/tools/profviz/profviz.js - About 1 hr to fix

              Function ls has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function ls (args, silent, cb) {
                if (typeof cb !== "function") cb = silent, silent = false
              
                var dir = path.resolve(npm.dir, "..")
              
              
              Severity: Minor
              Found in deps/npm/lib/ls.js - About 1 hr to fix

                Function installOne_ has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function installOne_ (target, where, context, cb_) {
                  var nm = path.resolve(where, "node_modules")
                    , targetFolder = path.resolve(nm, target.name)
                    , prettyWhere = path.relative(process.cwd(), where)
                    , parent = context.parent
                Severity: Minor
                Found in deps/npm/lib/install.js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                    if (keys.length <= 3
                        && data.name
                        && (keys.length === 1
                            || keys.length === 3 && data.email && data.url
                            || keys.length === 2 && (data.email || data.url))) {
                  Severity: Critical
                  Found in deps/npm/lib/view.js - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                        if token.type != TokenType.SEMICOLON:
                          next_code = tokenutil.SearchExcept(token, TokenType.NON_CODE_TYPES)
                          # A statement like if (x) does not need a semicolon after it
                          is_implied_block = self._context == EcmaContext.IMPLIED_BLOCK
                          is_last_code_in_line = token.IsCode() and (
                    Severity: Critical
                    Found in tools/closure_linter/closure_linter/ecmametadatapass.py - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                                if (function.has_return and function.doc and
                                    not is_immediately_called and
                                    not function.doc.HasFlag('return') and
                                    not function.doc.InheritsDocumentation() and
                                    not function.doc.HasFlag('constructor')):
                      Severity: Critical
                      Found in tools/closure_linter/closure_linter/javascriptlintrules.py - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                            if isinstance(other, PBXNativeTarget) and \
                               'productType' in self._properties and \
                               self._properties['productType'] != static_library_type and \
                               'productType' in other._properties and \
                               (other._properties['productType'] == static_library_type or \
                        Severity: Critical
                        Found in tools/gyp/pylib/gyp/xcodeproj_file.py - About 1 hr to fix

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

                              elif die < 0.6:
                                number_name = name + "_number"
                                result = self._Number(number_name, recursion_budget)
                                return result + self._Variable(name, "\"\" + %s" % number_name)
                          Severity: Major
                          Found in deps/v8/tools/generate-runtime-tests.py and 2 other locations - About 1 hr to fix
                          deps/v8/tools/generate-runtime-tests.py on lines 418..421
                          deps/v8/tools/generate-runtime-tests.py on lines 551..554

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

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

                              elif die < 0.5:
                                ms_name = name + "_ms"
                                result = self._Number(ms_name, recursion_budget)
                                return result + self._Variable(name, "new Date(%s)" % ms_name)
                          Severity: Major
                          Found in deps/v8/tools/generate-runtime-tests.py and 2 other locations - About 1 hr to fix
                          deps/v8/tools/generate-runtime-tests.py on lines 405..408
                          deps/v8/tools/generate-runtime-tests.py on lines 418..421

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

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

                            def _Symbol(self, name, recursion_budget):
                              raw_string_name = name + "_1"
                              result = self._String(raw_string_name, recursion_budget)
                              return result + self._Variable(name, "Symbol(%s)" % raw_string_name)
                          Severity: Major
                          Found in deps/v8/tools/generate-runtime-tests.py and 2 other locations - About 1 hr to fix
                          deps/v8/tools/generate-runtime-tests.py on lines 405..408
                          deps/v8/tools/generate-runtime-tests.py on lines 551..554

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

                          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

                          Object.defineProperty(npm, "dir",
                            { get : function () {
                                if (npm.config.get("global")) return npm.globalDir
                                return path.resolve(npm.prefix, "node_modules")
                              }
                          Severity: Major
                          Found in deps/npm/lib/npm.js and 1 other location - About 1 hr to fix
                          deps/npm/lib/npm.js on lines 389..395

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

                          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

                          Object.defineProperty(npm, "bin",
                            { get : function () {
                                if (npm.config.get("global")) return npm.globalBin
                                return path.resolve(npm.root, ".bin")
                              }
                          Severity: Major
                          Found in deps/npm/lib/npm.js and 1 other location - About 1 hr to fix
                          deps/npm/lib/npm.js on lines 405..411

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

                          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 setOptions has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          Server.prototype.setOptions = function(options) {
                            if (util.isBoolean(options.requestCert)) {
                              this.requestCert = options.requestCert;
                            } else {
                              this.requestCert = false;
                          Severity: Minor
                          Found in lib/_tls_wrap.js - About 1 hr to fix

                            Function onHandle has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              function onHandle() {
                                if (!legacy)
                                  socket._releaseControl();
                            
                                if (options.session)
                            Severity: Minor
                            Found in lib/_tls_wrap.js - About 1 hr to fix

                              Function formatResults has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function formatResults (args, results, cb) {
                                if (!results) return cb(null)
                              
                                var cols = Math.min(process.stdout.columns || Infinity, 80) + 1
                              
                              
                              Severity: Minor
                              Found in deps/npm/lib/help-search.js - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language