Showing 1,896 of 2,859 total issues

Function CheckCStyleCast has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

def CheckCStyleCast(filename, linenum, line, raw_line, cast_type, pattern,
Severity: Major
Found in tools/cpplint.py - About 50 mins to fix

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

      def __init__(self, text, requires, number, config, state, options, handler):
    Severity: Major
    Found in deps/v8/tools/push-to-trunk/common_includes.py - About 50 mins to fix

      Function GitLog has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        def GitLog(self, n=0, format="", grep="", git_hash="", parent_hash="",
      Severity: Major
      Found in deps/v8/tools/push-to-trunk/git_recipes.py - About 50 mins to fix

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

          def __init__(self, peer=None, context=None, tests=None, binaries=None,
        Severity: Major
        Found in deps/v8/tools/testrunner/objects/workpacket.py - About 50 mins to fix

          Function man_role has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def man_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
          Severity: Major
          Found in deps/uv/docs/src/sphinx-plugins/manpage.py - About 50 mins to fix

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

            function emitKeys(stream, s) {
              if (util.isBuffer(s)) {
                if (s[0] > 127 && util.isUndefined(s[1])) {
                  s[0] -= 128;
                  s = '\x1b' + s.toString(stream.encoding || 'utf-8');
            Severity: Minor
            Found in lib/readline.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 newSection has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

            function newSection(tok) {
              var section = {};
              // infer the type from the text.
              var text = section.textRaw = tok.text;
              if (text.match(eventExpr)) {
            Severity: Minor
            Found in tools/doc/json.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

            Avoid deeply nested control flow statements.
            Open

                          if (!self.paused) {
                            // Stream must be paused and resumed after SIGCONT to catch
                            // SIGINT, SIGTSTP, and EOF.
                            self.pause();
                            self.emit('SIGCONT');
            Severity: Major
            Found in lib/readline.js - About 45 mins to fix

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

              function socketOnData(d) {
                var socket = this;
                var req = this._httpMessage;
                var parser = this.parser;
              
              
              Severity: Minor
              Found in lib/_http_client.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

              Avoid deeply nested control flow statements.
              Open

                      if (this._sawReturn)
                        this._sawReturn = false;
                      else
                        this._line();
              Severity: Major
              Found in lib/readline.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                          if (match.index === posWithinLine) {
                            break;
                          }
                Severity: Major
                Found in doc/sh_main.js - About 45 mins to fix

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

                  function stableSort(array, compare) {
                    assert(Array.isArray(array), 'array must be an array');
                  
                    if (!compare) {
                      compare = defaultCompare;
                  Severity: Minor
                  Found in tools/common.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

                  Avoid deeply nested control flow statements.
                  Open

                          if (base.match(/-\d+\.\d+(\.\d+)?/) || name === '.npm') {
                            // Exclude versioned names that 'npm' installs.
                            continue;
                          }
                  Severity: Major
                  Found in lib/repl.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                            if (util.isBuffer(s))
                              s = s.toString('utf-8');
                    Severity: Major
                    Found in lib/readline.js - About 45 mins to fix

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

                      function processCmdLineArgs() {
                        var cmdLineOpts = {};
                      
                        var cmdLineArgs = process.argv.splice(2);
                        for (var i = 0; i < cmdLineArgs.length; ++i) {
                      Severity: Minor
                      Found in tools/update-authors.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

                      Avoid deeply nested control flow statements.
                      Open

                            if (line.length === 0) {
                              filter = '';
                              expr = '';
                            } else if (line[line.length - 1] === '.') {
                              filter = '';
                      Severity: Major
                      Found in lib/repl.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                    if (tmp < 0) {
                                      //more to go, recurse
                                      depth += curr.depth;
                                      workIt();
                                    } else if (tmp > 0) {
                        Severity: Major
                        Found in lib/repl.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                    for (var subexpression = 0; subexpression < newStyle.length; subexpression++) {
                                      matchedString = bestMatch[subexpression + 1];
                                      output(matchedString, newStyle[subexpression]);
                                    }
                          Severity: Major
                          Found in doc/sh_main.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                    if (exts.indexOf(ext) !== -1) {
                                      if (!subdir || base !== 'index') {
                                        group.push(subdir + base);
                                      }
                                    } else {
                            Severity: Major
                            Found in lib/repl.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                    if (!expr) {
                                      // If context is instance of vm.ScriptContext
                                      // Get global vars synchronously
                                      if (this.useGlobal ||
                                          this.context.constructor &&
                              Severity: Major
                              Found in lib/repl.js - About 45 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language