Showing 1,896 of 2,859 total issues

Avoid too many return statements within this function.
Open

      return up_to_args + "(" + ",".join(map(self.FindNewName, args)) + "){"
Severity: Major
Found in deps/v8/tools/jsmin.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        return 0
    Severity: Major
    Found in deps/v8/tools/generate-runtime-tests.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return None
      Severity: Major
      Found in deps/v8/tools/testrunner/local/utils.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

          return machine  # Return as-is and hope for the best.
        Severity: Major
        Found in deps/uv/gyp_uv.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                return self.map[matched_text]
          Severity: Major
          Found in deps/v8/tools/jsmin.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return 'ia32'
            Severity: Major
            Found in deps/v8/tools/testrunner/local/utils.py - About 30 mins to fix

              Function normalizeExecArgs has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function normalizeExecArgs(command /*, options, callback */) {
                var file, args, options, callback;
              
                if (util.isFunction(arguments[1])) {
                  options = undefined;
              Severity: Minor
              Found in lib/child_process.js - About 25 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 getStringWidth has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function getStringWidth(str) {
                var width = 0;
                str = stripVTControlCharacters(str);
                for (var i = 0, len = str.length; i < len; i++) {
                  var code = codePointAt(str, i);
              Severity: Minor
              Found in lib/readline.js - About 25 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 responseOnEnd has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function responseOnEnd() {
                var res = this;
                var req = res.req;
                var socket = req.socket;
              
              
              Severity: Minor
              Found in lib/_http_client.js - About 25 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 parserOnIncomingClient has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function parserOnIncomingClient(res, shouldKeepAlive) {
                var socket = this.socket;
                var req = socket._httpMessage;
              
              
              
              Severity: Minor
              Found in lib/_http_client.js - About 25 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 mirrorObject has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              Client.prototype.mirrorObject = function(handle, depth, cb) {
                var self = this;
              
                var val;
              
              
              Severity: Minor
              Found in lib/_debugger.js - About 25 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 cursorTo has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function cursorTo(stream, x, y) {
                if (util.isNullOrUndefined(stream))
                  return;
              
                if (!util.isNumber(x) && !util.isNumber(y))
              Severity: Minor
              Found in lib/readline.js - About 25 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 destroy has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              Agent.prototype.destroy = function() {
                var sets = [this.freeSockets, this.sockets];
                for (var s = 0; s < sets.length; s++) {
                  var set = sets[s];
                  var keys = Object.keys(set);
              Severity: Minor
              Found in lib/_http_agent.js - About 25 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 setTimeout has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              Socket.prototype.setTimeout = function(msecs, callback) {
                if (msecs === 0) {
                  timers.unenroll(this);
                  if (callback) {
                    this.removeListener('timeout', callback);
              Severity: Minor
              Found in lib/net.js - About 25 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 6 (exceeds 5 allowed). Consider refactoring.
              Open

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

              Zlib.prototype.params = function(level, strategy, callback) {
                if (level < exports.Z_MIN_LEVEL ||
                    level > exports.Z_MAX_LEVEL) {
                  throw new RangeError('Invalid compression level: ' + level);
                }
              Severity: Minor
              Found in lib/zlib.js - About 25 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 debuglog has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              exports.debuglog = function(set) {
                if (isUndefined(debugEnviron))
                  debugEnviron = process.env.NODE_DEBUG || '';
                set = set.toUpperCase();
                if (!debugs[set]) {
              Severity: Minor
              Found in lib/util.js - About 25 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 normalizeConnectArgs has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function normalizeConnectArgs(args) {
                var options = {};
              
                if (util.isObject(args[0])) {
                  // connect(options, [cb])
              Severity: Minor
              Found in lib/net.js - About 25 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 intercepted has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function intercepted(_this, self, cb, fnargs) {
                if (self._disposed)
                  return;
              
                if (fnargs[0] && fnargs[0] instanceof Error) {
              Severity: Minor
              Found in lib/domain.js - About 25 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 parserOnMessageComplete has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function parserOnMessageComplete() {
                var parser = this;
                var stream = parser.incoming;
              
                if (stream) {
              Severity: Minor
              Found in lib/_http_common.js - About 25 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