Showing 2,859 of 2,859 total issues

Function getExtras has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

function getExtras (data) {
  var extras = []

  if (data.description) extras.push(data.description)
  if (data.repository) extras.push(data.repository.url)
Severity: Minor
Found in deps/npm/lib/ls.js - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function installAndRetest has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

function installAndRetest (set, filter, dir, unavoidable, silent, cb) {
Severity: Minor
Found in deps/npm/lib/dedupe.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

              if (matches != null) {
                readingAsm = true;
                asmBegin = -1;
                currentFunctionName = matches[1];
              }
    Severity: Major
    Found in deps/v8/tools/sodium/sodium.js - About 45 mins to fix

      Function read has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      function read (name, ver, forceBypass, cb) {
        assert(typeof name === "string", "must include name of module to install")
        assert(typeof cb === "function", "must include callback")
      
        if (forceBypass === undefined || forceBypass === null) forceBypass = true
      Severity: Minor
      Found in deps/npm/lib/cache.js - About 45 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function addPlacedTarball_ has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function addPlacedTarball_ (p, pkgData, uid, gid, resolvedSum, cb) {
      Severity: Minor
      Found in deps/npm/lib/cache/add-local-tarball.js - About 45 mins to fix

        Function cloneResolved has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        function cloneResolved (from, resolvedURL, resolvedTreeish, cachedRemote, tmpdir, cb) {
        Severity: Minor
        Found in deps/npm/lib/cache/add-remote-git.js - About 45 mins to fix

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

            def __init__(self, name, default, help, enum_values=None,
          Severity: Minor
          Found in tools/closure_linter/gflags.py - About 45 mins to fix

            Function mirrorRemote has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            function mirrorRemote (from, cloneURL, treeish, cachedRemote, silent, cb) {
            Severity: Minor
            Found in deps/npm/lib/cache/add-remote-git.js - About 45 mins to fix

              Function save has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              function save (where, installed, tree, pretty, hasArguments, cb) {
              Severity: Minor
              Found in deps/npm/lib/install.js - About 45 mins to fix

                Function DEFINE_enum has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def DEFINE_enum(name, default, enum_values, help, flag_values=FLAGS,
                Severity: Minor
                Found in tools/closure_linter/gflags.py - About 45 mins to fix

                  Function Write has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    def Write(self, qualified_target, base_path, output_filename, spec, configs,
                  Severity: Minor
                  Found in tools/gyp/pylib/gyp/generator/make.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                if jsdoc.HasFlag('private') and 'underscore' in jsdoc.suppressions:
                                  self._HandleError(errors.UNNECESSARY_SUPPRESS,
                                      '@suppress {underscore} is not necessary with @private',
                                      jsdoc.suppressions['underscore'])
                              elif jsdoc.HasFlag('private'):
                    Severity: Major
                    Found in tools/closure_linter/closure_linter/ecmalintrules.py - About 45 mins to fix

                      Function WriteDoCmd has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        def WriteDoCmd(self, outputs, inputs, command, part_of_all, comment=None,
                      Severity: Minor
                      Found in tools/gyp/pylib/gyp/generator/make.py - About 45 mins to fix

                        Function Serialize has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                        Open

                          def Serialize(self):
                            if self.value is None:
                              return ''
                            if self.boolean:
                              if self.value:
                        Severity: Minor
                        Found in tools/closure_linter/gflags.py - About 45 mins to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Avoid deeply nested control flow statements.
                        Open

                                    if end_token.type in Type.FLAG_DESCRIPTION_TYPES:
                                      end_string = htmlutil.StripTags(end_token.string).rstrip()
                        
                        
                        Severity: Major
                        Found in tools/closure_linter/closure_linter/ecmalintrules.py - About 45 mins to fix

                          Function WriteActions has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def WriteActions(target_name, actions, extra_sources, extra_deps,
                          Severity: Minor
                          Found in tools/gyp/pylib/gyp/generator/cmake.py - About 45 mins to fix

                            Function WriteRules has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def WriteRules(target_name, rules, extra_sources, extra_deps,
                            Severity: Minor
                            Found in tools/gyp/pylib/gyp/generator/cmake.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                          if not (comment and comment.lower().count('jsdoc inherited')):
                                            self._HandleError(errors.MISSING_MEMBER_DOCUMENTATION,
                                                "No docs found for member '%s'" % identifier,
                                                token);
                                      elif jsdoc and (not state.InConstructor() or
                              Severity: Major
                              Found in tools/closure_linter/closure_linter/ecmalintrules.py - About 45 mins to fix

                                Function _GetOperatorType has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  def _GetOperatorType(self, token):
                                    """Returns the operator type of the given operator token.
                                
                                    Args:
                                      token: The token to get arity for.
                                Severity: Minor
                                Found in tools/closure_linter/closure_linter/ecmametadatapass.py - About 45 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Function _GetMatchingEndBraceAndContents has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                Open

                                def _GetMatchingEndBraceAndContents(start_brace):
                                  """Returns the matching end brace and contents between the two braces.
                                
                                  If any FLAG_ENDING_TYPE token is encountered before a matching end brace, then
                                  that token is used as the matching ending token. Contents will have all
                                Severity: Minor
                                Found in tools/closure_linter/closure_linter/statetracker.py - About 45 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Severity
                                Category
                                Status
                                Source
                                Language