Showing 1,896 of 2,859 total issues

Function WriteSourcesForArch has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def WriteSourcesForArch(self, ninja_file, config_name, config, sources,
Severity: Major
Found in tools/gyp/pylib/gyp/generator/ninja.py - About 1 hr to fix

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

      def __init__(self, path, name = None, dependencies = None, guid = None,
    Severity: Major
    Found in tools/gyp/pylib/gyp/MSVSNew.py - About 1 hr to fix

      Function _AddMSBuildAction has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def _AddMSBuildAction(spec, primary_input, inputs, outputs, cmd, description,
      Severity: Major
      Found in tools/gyp/pylib/gyp/generator/msvs.py - About 1 hr to fix

        Function LoadTargetBuildFilesParallel has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def LoadTargetBuildFilesParallel(build_files, data, aux_data,
        Severity: Major
        Found in tools/gyp/pylib/gyp/input.py - About 1 hr to fix

          Function LoadTargetBuildFile has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def LoadTargetBuildFile(build_file_path, data, aux_data, variables, includes,
          Severity: Major
          Found in tools/gyp/pylib/gyp/input.py - About 1 hr to fix

            Function GetLdflags has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              def GetLdflags(self, config, gyp_to_build_path, expand_special,
            Severity: Major
            Found in tools/gyp/pylib/gyp/msvs_emulation.py - About 1 hr to fix

              Consider simplifying this complex logical expression.
              Open

                if (cleansed_line.count(';') > 1 and
                    # for loops are allowed two ;'s (and may run over two lines).
                    cleansed_line.find('for') == -1 and
                    (GetPreviousNonBlankLine(clean_lines, linenum)[0].find('for') == -1 or
                     GetPreviousNonBlankLine(clean_lines, linenum)[0].find(';') != -1) and
              Severity: Major
              Found in tools/cpplint.py - About 1 hr to fix

                Function Load has 8 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def Load(build_files, format, default_variables={},
                Severity: Major
                Found in tools/gyp/pylib/gyp/__init__.py - About 1 hr to fix

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

                    def __init__(self, workspace, buildspace, verbose, vm, timeout, processor, suppress_dialogs, store_unexpected_output):
                  Severity: Major
                  Found in tools/test.py - About 1 hr to fix

                    Function ProcessLine has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def ProcessLine(filename, file_extension,
                    Severity: Major
                    Found in tools/cpplint.py - About 1 hr to fix

                      Function watchers has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                      Interface.prototype.watchers = function() {
                        var self = this,
                            verbose = arguments[0] || false,
                            callback = arguments[1] || function() {},
                            waiting = this._watchers.length,
                      Severity: Minor
                      Found in lib/_debugger.js - About 55 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 SourceInfo has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function SourceInfo(body) {
                        var result = body.exception ? 'exception in ' : 'break in ';
                      
                        if (body.script) {
                          if (body.script.name) {
                      Severity: Minor
                      Found in lib/_debugger.js - About 55 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 resolve has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                      posix.resolve = function() {
                        var resolvedPath = '',
                            resolvedAbsolute = false;
                      
                        for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
                      Severity: Minor
                      Found in lib/path.js - About 55 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 _addHeaderLine has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                      IncomingMessage.prototype._addHeaderLine = function(field, value, dest) {
                        field = field.toLowerCase();
                        switch (field) {
                          // Array headers:
                          case 'set-cookie':
                      Severity: Minor
                      Found in lib/_http_incoming.js - About 55 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 formatPrimitive has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function formatPrimitive(ctx, value) {
                        if (isUndefined(value))
                          return ctx.stylize('undefined', 'undefined');
                        if (isString(value)) {
                          var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
                      Severity: Minor
                      Found in lib/util.js - About 55 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 join has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                      posix.join = function() {
                        var path = '';
                        for (var i = 0; i < arguments.length; i++) {
                          var segment = arguments[i];
                          if (!util.isString(segment)) {
                      Severity: Minor
                      Found in lib/path.js - About 55 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 inspect has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function inspect(obj, opts) {
                        // default options
                        var ctx = {
                          seen: [],
                          stylize: stylizeNoColor
                      Severity: Minor
                      Found in lib/util.js - About 55 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 onread has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function onread(nread, buffer) {
                        var handle = this;
                        var self = handle.owner;
                        assert(handle === self._handle, 'handle != self._handle');
                      
                      
                      Severity: Minor
                      Found in lib/net.js - About 55 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 close has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                      Server.prototype.close = function(cb) {
                        function onSlaveClose() {
                          if (--left !== 0) return;
                      
                          self._connections = 0;
                      Severity: Minor
                      Found in lib/net.js - About 55 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 deprecate has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                      exports.deprecate = function(fn, msg) {
                        // Allow for deprecating things in the process of starting up.
                        if (isUndefined(global.process)) {
                          return function() {
                            return exports.deprecate(fn, msg).apply(this, arguments);
                      Severity: Minor
                      Found in lib/util.js - About 55 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