Showing 2,859 of 2,859 total issues

Function filterInstalled has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function filterInstalled (local, global, filter, cb) {
  var fl
    , fg

  if (!filter) {
Severity: Minor
Found in deps/npm/lib/utils/completion/installed-shallow.js - About 1 hr to fix

    Function completion has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    install.completion = function (opts, cb) {
      // install can complete to a folder with a package.json, or any package.
      // if it has a slash, then it's gotta be a folder
      // if it starts with https?://, then just give up, because it's a url
      if (/^https?:\/\//.test(opts.partialWord)) {
    Severity: Minor
    Found in deps/npm/lib/install.js - About 1 hr to fix

      Function GenerateOutputForConfig has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      def GenerateOutputForConfig(target_list, target_dicts, data, params,
                                  config_name):
        options = params['options']
        flavor = gyp.common.GetFlavor(params)
        generator_flags = params.get('generator_flags', {})
      Severity: Minor
      Found in tools/gyp/pylib/gyp/generator/ninja.py - About 1 hr to fix

        Function execute has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        Protocol.prototype.execute = function(d) {
          var res = this.res;
          res.raw += d;
        
          switch (this.state) {
        Severity: Minor
        Found in lib/_debugger.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_mergeTags has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        function sh_mergeTags(originalTags, highlightTags) {
          var numOriginalTags = originalTags.length;
          if (numOriginalTags === 0) {
            return highlightTags;
          }
        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 _resolveLookupPaths has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        Module._resolveLookupPaths = function(request, parent) {
          if (NativeModule.exists(request)) {
            return [request, []];
          }
        
        
        Severity: Minor
        Found in lib/module.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 spawn has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        ChildProcess.prototype.spawn = function(options) {
          var self = this,
              ipc,
              ipcFd,
              // If no `stdio` option was given - use default
        Severity: Minor
        Found in lib/child_process.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_insertTags has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        function sh_insertTags(tags, text) {
          var doc = document;
        
          var result = document.createDocumentFragment();
          var tagIndex = 0;
        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 normalizeArray has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        function normalizeArray(parts, allowAboveRoot) {
          var res = [];
          for (var i = 0; i < parts.length; i++) {
            var p = parts[i];
        
        
        Severity: Minor
        Found in lib/path.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 DiffieHellman has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        function DiffieHellman(sizeOrKey, keyEncoding, generator, genEncoding) {
          if (!(this instanceof DiffieHellman))
            return new DiffieHellman(sizeOrKey, keyEncoding, generator, genEncoding);
        
          if (!util.isBuffer(sizeOrKey) &&
        Severity: Minor
        Found in lib/crypto.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 write has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        StringDecoder.prototype.write = function(buffer) {
          var charStr = '';
          // if our last write ended with an incomplete multibyte character
          while (this.charLength) {
            // determine how many remaining bytes this buffer has to offer for this char
        Severity: Minor
        Found in lib/string_decoder.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 bnpFromRadix has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        function bnpFromRadix(s,b) {
          this.fromInt(0);
          if(b == null) b = 10;
          var cs = this.chunkSize(b);
          var d = Math.pow(b,cs), mi = false, j = 0, w = 0;
        Severity: Minor
        Found in deps/v8/benchmarks/crypto.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 runTest has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        function runTest(dur, size, type) {
          if (type !== 'string')
            type = 'buffer';
          switch (type) {
            case 'string':
        Severity: Minor
        Found in benchmark/fs-write-stream-throughput.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 formatObject_ has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        function formatObject_(value, include_properties) {
          var result = '';
          result += formatHandleReference_(value);
          result += ', type: object';
          result += ', constructor ';
        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

        Function sc_escapeWriteString has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        function sc_escapeWriteString(s) {
            var res = "";
            var j = 0;
            for (i = 0; i < s.length; i++) {
            switch (s.charAt(i)) {
        Severity: Minor
        Found in deps/v8/benchmarks/earley-boyer.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 parse has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        ArgumentsProcessor.prototype.parse = function() {
          while (this.args_.length) {
            var arg = this.args_[0];
            if (arg.charAt(0) != '-') {
              break;
        Severity: Minor
        Found in deps/v8/tools/tickprocessor.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 completion has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        function completion (args, cb) {
          if (process.platform === "win32") {
            var e = new Error("npm completion not supported on windows")
            e.code = "ENOTSUP"
            e.errno = require("constants").ENOTSUP
        Severity: Minor
        Found in deps/npm/lib/completion.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 warnDeprecated has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        function warnDeprecated (type) {
          return function warn (messages, instance) {
            if (!instance) {
              if (!deprecations[type]) {
                deprecations[type] = {}
        Severity: Minor
        Found in deps/npm/lib/utils/warn-deprecated.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 addNameRange has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        function addNameRange (name, range, data, cb) {
          range = semver.validRange(range, true)
          if (range === null) return cb(new Error(
            "Invalid version range: " + range
          ))
        Severity: Minor
        Found in deps/npm/lib/cache/add-named.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 addLocal has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        function addLocal (p, pkgData, cb_) {
          assert(typeof p === "object", "must have spec info")
          assert(typeof cb === "function", "must have callback")
        
          pkgData = pkgData || {}
        Severity: Minor
        Found in deps/npm/lib/cache/add-local.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