Showing 1,896 of 2,859 total issues

Function bnpAddTo has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function bnpAddTo(a,r) {
  var this_array = this.array;
  var a_array = a.array;
  var r_array = r.array;
  var i = 0, c = 0, m = Math.min(a.t,this.t);
Severity: Minor
Found in deps/v8/benchmarks/crypto.js - About 1 hr to fix

    Function bnpSubTo has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function bnpSubTo(a,r) {
      var this_array = this.array;
      var r_array = r.array;
      var a_array = a.array;
      var i = 0, c = 0, m = Math.min(a.t,this.t);
    Severity: Minor
    Found in deps/v8/benchmarks/crypto.js - About 1 hr to fix

      Function project has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function project(u, v, p, div)
          {
              var h = -0.5 / Math.sqrt(width * height);
              for (var j = 1 ; j <= height; j++ ) {
                  var row = j * rowSize;
      Severity: Minor
      Found in deps/v8/benchmarks/navier-stokes.js - About 1 hr to fix

        Function findPlotRange has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          this.findPlotRange = function(
            range_start_override, range_end_override, result_callback) {
            var start_found = (range_start_override || range_start_override == 0);
            var end_found = (range_end_override || range_end_override == 0);
            range_start = start_found ? range_start_override : Infinity;
        Severity: Minor
        Found in deps/v8/tools/profviz/composer.js - About 1 hr to fix

          Function version has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function version (args, silent, cb_) {
            if (typeof cb_ !== "function") cb_ = silent, silent = false
            if (args.length > 1) return cb_(version.usage)
          
            var packagePath = path.join(npm.localPrefix, "package.json")
          Severity: Minor
          Found in deps/npm/lib/version.js - About 1 hr to fix

            Function resolveHead has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function resolveHead (from, cloneURL, treeish, cachedRemote, cb) {
              log.verbose('resolveHead', from, 'original treeish:', treeish)
              var args = ['rev-list', '-n1', treeish]
              git.whichAndExec(
                args,
            Severity: Minor
            Found in deps/npm/lib/cache/add-remote-git.js - About 1 hr to fix

              Function whoami has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function whoami (args, silent, cb) {
                // FIXME: need tighter checking on this, but is a breaking change
                if (typeof cb !== "function") {
                  cb = silent
                  silent = false
              Severity: Minor
              Found in deps/npm/lib/whoami.js - About 1 hr to fix

                Function defineDefaultCommands has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                function defineDefaultCommands(repl) {
                  // TODO remove me after 0.3.x
                  repl.defineCommand('break', {
                    help: 'Sometimes you get stuck, this gets you out',
                    action: function() {
                Severity: Minor
                Found in lib/repl.js - About 1 hr 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 _getDisplayPos has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                Interface.prototype._getDisplayPos = function(str) {
                  var offset = 0;
                  var col = this.columns;
                  var row = 0;
                  var code;
                Severity: Minor
                Found in lib/readline.js - About 1 hr 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 sh_load has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                function sh_load(language, element, prefix, suffix) {
                  if (language in sh_requests) {
                    sh_requests[language].push(element);
                    return;
                  }
                Severity: Minor
                Found in doc/sh_main.js - About 1 hr 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 emitKeypressEvents has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                function emitKeypressEvents(stream) {
                  if (stream._keypressDecoder) return;
                  var StringDecoder = require('string_decoder').StringDecoder; // lazy load
                  stream._keypressDecoder = new StringDecoder('utf8');
                
                
                Severity: Minor
                Found in lib/readline.js - About 1 hr 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 parseCertString has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                exports.parseCertString = function parseCertString(s) {
                  var out = {};
                  var parts = s.split('\n');
                  for (var i = 0, len = parts.length; i < len; i++) {
                    var sepIndex = parts[i].indexOf('=');
                Severity: Minor
                Found in lib/tls.js - About 1 hr 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 WriteStream has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                function WriteStream(path, options) {
                  if (!(this instanceof WriteStream))
                    return new WriteStream(path, options);
                
                  options = options || {};
                Severity: Minor
                Found in lib/fs.js - About 1 hr 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 error has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                SecurePair.prototype.error = function(returnOnly) {
                  var err = this.ssl.error;
                  this.ssl.error = null;
                
                  if (!this._secureEstablished) {
                Severity: Minor
                Found in lib/_tls_legacy.js - About 1 hr 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 _transform has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                Zlib.prototype._transform = function(chunk, encoding, cb) {
                  var flushFlag;
                  var ws = this._writableState;
                  var ending = ws.ending || ws.ended;
                  var last = ending && (!chunk || ws.length === chunk.length);
                Severity: Minor
                Found in lib/zlib.js - About 1 hr 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 unrefTimeout has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                function unrefTimeout() {
                  var now = Timer.now();
                
                  debug('unrefTimer fired');
                
                
                Severity: Minor
                Found in lib/timers.js - About 1 hr 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 toString has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                Buffer.prototype.toString = function(encoding, start, end) {
                  var loweredCase = false;
                
                  start = start >>> 0;
                  end = util.isUndefined(end) || end === Infinity ? this.length : end >>> 0;
                Severity: Minor
                Found in lib/buffer.js - About 1 hr 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 requestOCSP has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                function requestOCSP(self, hello, ctx, cb) {
                  if (!hello.OCSPRequest || !self.server)
                    return cb(null);
                
                  if (!ctx)
                Severity: Minor
                Found in lib/_tls_wrap.js - About 1 hr 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 storeHeader has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                function storeHeader(self, state, field, value) {
                  // Protect against response splitting. The if statement is there to
                  // minimize the performance impact in the common case.
                  if (/[\r\n]/.test(value))
                    value = value.replace(/[\r\n]+[ \t]*/g, '');
                Severity: Minor
                Found in lib/_http_outgoing.js - About 1 hr 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 DebugRequest has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                function DebugRequest(cmd_line) {
                  // If the very first character is a { assume that a JSON request have been
                  // entered as a command. Converting that to a JSON request is trivial.
                  if (cmd_line && cmd_line.length > 0 && cmd_line.charAt(0) == '{') {
                    this.request_ = cmd_line;
                Severity: Minor
                Found in deps/v8/src/d8.js - About 1 hr 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