Showing 2,859 of 2,859 total issues

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

      if group_ref != None:
        assert group_ref.__class__ == PBXGroup
      else:
        group_ref = PBXGroup({'path': next_dir})
        self.AppendChild(group_ref)
Severity: Major
Found in tools/gyp/pylib/gyp/xcodeproj_file.py and 1 other location - About 1 hr to fix
tools/gyp/pylib/gyp/xcodeproj_file.py on lines 1268..1272

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

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

def DEFINE_spaceseplist(name, default, help, flag_values=FLAGS, **args):
  """Registers a flag whose value is a whitespace-separated list of strings.

  Any whitespace can be used as a separator.
  """
Severity: Major
Found in tools/closure_linter/gflags.py and 1 other location - About 1 hr to fix
tools/closure_linter/gflags.py on lines 2332..2336

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

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

        if file_ref != None:
          assert file_ref.__class__ == PBXFileReference
        else:
          file_ref = PBXFileReference({'path': path})
          self.AppendChild(file_ref)
Severity: Major
Found in tools/gyp/pylib/gyp/xcodeproj_file.py and 1 other location - About 1 hr to fix
tools/gyp/pylib/gyp/xcodeproj_file.py on lines 1299..1303

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

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

def DEFINE_list(name, default, help, flag_values=FLAGS, **args):
  """Registers a flag whose value is a comma-separated list of strings."""
  parser = ListParser()
  serializer = ListSerializer(',')
  DEFINE(parser, name, default, help, flag_values, serializer, **args)
Severity: Major
Found in tools/closure_linter/gflags.py and 1 other location - About 1 hr to fix
tools/closure_linter/gflags.py on lines 2339..2346

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

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

  function createWritableStdioStream(fd) {
    var stream;
    var tty_wrap = process.binding('tty_wrap');

    // Note stream._type is used for test-module-load-list.js
Severity: Minor
Found in src/node.js - About 1 hr to fix

    Function createSocket has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Agent.prototype.createSocket = function(req, options) {
      var self = this;
      options = util._extend({}, options);
      options = util._extend(options, self.options);
    
    
    Severity: Minor
    Found in lib/_http_agent.js - About 1 hr to fix

      Function pipe has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      exports.pipe = function pipe(pair, socket) {
        pair.encrypted.pipe(socket);
        socket.pipe(pair.encrypted);
      
        pair.encrypted.on('close', function() {
      Severity: Minor
      Found in lib/_tls_legacy.js - About 1 hr to fix

        Function run has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function run() {
          if (--r < 0)
            return compare();
          toggle = ++toggle % 2;
        
        
        Severity: Minor
        Found in benchmark/compare.js - About 1 hr to fix

          Function sc_toWriteCircleString has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          sc_Pair.prototype.sc_toWriteCircleString = function(symb, inList) {
              if (this[symb + "use"]) { // use-flag is set. Just use it.
              var nb = this[symb + "nb"];
              if (this[symb]-- === 0) { // if we are the last use. remove all fields.
                  delete this[symb];
          Severity: Minor
          Found in deps/v8/benchmarks/earley-boyer.js - About 1 hr to fix

            Function installedDeep has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function installedDeep (opts, cb) {
              var local
                , global
                , depth = npm.config.get("depth")
                , opt = { depth: depth, dev: true }
            Severity: Minor
            Found in deps/npm/lib/utils/completion/installed-deep.js - About 1 hr to fix

              Function updateDeps has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function updateDeps (er, d) {
                  if (er) {
                    if (parsed.type !== 'local') return cb()
                    return updateLocalDeps()
                  }
              Severity: Minor
              Found in deps/npm/lib/outdated.js - About 1 hr to fix

                Function rmMans has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function rmMans (pkg, folder, parent, top, cb) {
                  if (!pkg.man
                      || !top
                      || process.platform === "win32"
                      || !npm.config.get("global")) {
                Severity: Minor
                Found in deps/npm/lib/unbuild.js - About 1 hr to fix

                  Function save has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function save (c, u, cb) {
                    npm.spinner.start()
                  
                    // save existing configs, but yank off for this PUT
                    var uri   = npm.config.get("registry")
                  Severity: Minor
                  Found in deps/npm/lib/adduser.js - About 1 hr to fix

                    Function X has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        , function X (er) {
                          if (er) return cb(er)
                    
                          // before continuing to installing dependencies, check for a shrinkwrap.
                          var opt = { dev: npm.config.get("dev") }
                    Severity: Minor
                    Found in deps/npm/lib/install.js - About 1 hr to fix

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

                        .concat(Object.keys(data.dependencies || {})
                          .sort(alphasort).map(function (d) {
                            return makeParseable(data.dependencies[d], long, dir, depth + 1, data, d)
                          }))
                      Severity: Major
                      Found in deps/npm/lib/ls.js and 1 other location - About 1 hr to fix
                      deps/npm/lib/ls.js on lines 314..317

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

                      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

                          out.nodes = Object.keys(data.dependencies || {})
                            .sort(alphasort).map(function (d) {
                              return makeArchy_(data.dependencies[d], long, dir, depth + 1, data, d)
                            })
                      Severity: Major
                      Found in deps/npm/lib/ls.js and 1 other location - About 1 hr to fix
                      deps/npm/lib/ls.js on lines 349..352

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

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

                        startup.processSignalHandlers = function() {
                          // Load events module in order to access prototype elements on process like
                          // process.addListener.
                          var signalWraps = {};
                          var addListener = process.addListener;
                      Severity: Minor
                      Found in src/node.js - About 1 hr to fix

                        Function clearBreakpoint has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        Interface.prototype.clearBreakpoint = function(script, line) {
                          if (!this.requireConnection()) return;
                        
                          var ambiguous,
                              breakpoint,
                        Severity: Minor
                        Found in lib/_debugger.js - About 1 hr to fix

                          Function readableAddChunk has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function readableAddChunk(stream, state, chunk, encoding, addToFront) {
                            var er = chunkInvalid(state, chunk);
                            if (er) {
                              stream.emit('error', er);
                            } else if (chunk === null) {
                          Severity: Minor
                          Found in lib/_stream_readable.js - About 1 hr to fix

                            Function bnpFromString has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function bnpFromString(s,b) {
                              var this_array = this.array;
                              var k;
                              if(b == 16) k = 4;
                              else if(b == 8) k = 3;
                            Severity: Minor
                            Found in deps/v8/benchmarks/crypto.js - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language