Showing 1,896 of 2,859 total issues

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 base_str
      Severity: Major
      Found in deps/v8/tools/gdb-v8-support.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  # Nothing more to do.
          Severity: Major
          Found in deps/v8/tools/testrunner/server/main.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 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 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 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 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 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 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 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 getName has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              Agent.prototype.getName = function(options) {
                var name = http.Agent.prototype.getName.call(this, options);
              
                name += ':';
                if (options.ca)
              Severity: Minor
              Found in lib/https.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

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

              function onclienthello(hello) {
                var self = this,
                    once = false;
              
                this._resumingSession = true;
              Severity: Minor
              Found in lib/_tls_legacy.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 parserOnHeadersComplete has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function parserOnHeadersComplete(info) {
                debug('parserOnHeadersComplete', info);
                var parser = this;
                var headers = info.headers;
                var url = info.url;
              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

              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 onnewsession has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function onnewsession(key, session) {
                if (!this.server)
                  return;
              
                var self = this;
              Severity: Minor
              Found in lib/_tls_wrap.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

              Severity
              Category
              Status
              Source
              Language