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 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 self._SlicedString(name)
      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 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 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

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

              Timeout.prototype.unref = function() {
                if (!this._handle) {
                  var now = Timer.now();
                  if (!this._idleStart) this._idleStart = now;
                  var delay = this._idleStart + this._idleTimeout - now;
              Severity: Minor
              Found in lib/timers.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 onnewsession has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function onnewsession(key, session) {
                if (!this.server) return;
              
                var self = this;
                var once = false;
              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

              Severity
              Category
              Status
              Source
              Language