Showing 1,896 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

                          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

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

                                Object.keys(abbrevs).concat(plumbing).forEach(function addCommand (c) {
                                  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.")
                                Severity: Minor
                                Found in deps/npm/lib/npm.js - About 1 hr to fix

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

                                  function makeCacheDir (cb) {
                                    cb = inflight("makeCacheDir", cb)
                                    if (!cb) {
                                      return log.verbose(
                                        "getCacheStat",
                                  Severity: Minor
                                  Found in deps/npm/lib/cache/get-stat.js - About 1 hr to fix

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

                                    def _GenerateMSBuildProject(project, options, version, generator_flags):
                                      spec = project.spec
                                      configurations = spec['configurations']
                                      project_dir, project_file_name = os.path.split(project.path)
                                      gyp.common.EnsureDirExists(project.path)
                                    Severity: Minor
                                    Found in tools/gyp/pylib/gyp/generator/msvs.py - About 1 hr to fix

                                      Function sh_mergeTags has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function sh_mergeTags(originalTags, highlightTags) {
                                        var numOriginalTags = originalTags.length;
                                        if (numOriginalTags === 0) {
                                          return highlightTags;
                                        }
                                      Severity: Minor
                                      Found in doc/sh_main.js - About 1 hr to fix

                                        Function addTmpTarball has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function addTmpTarball (tgz, pkgData, shasum, cb) {
                                          assert(typeof cb === "function", "must have callback function")
                                          assert(shasum, "must have shasum by now")
                                        
                                          cb = inflight("addTmpTarball:" + tgz, cb)
                                        Severity: Minor
                                        Found in deps/npm/lib/cache/add-local-tarball.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language