Showing 1,896 of 2,859 total issues

Function splay_ has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

SplayTree.prototype.splay_ = function(key) {
  if (this.isEmpty()) {
    return;
  }
  // Create a dummy node.  The use of the dummy node is a bit
Severity: Minor
Found in deps/v8/tools/splaytree.js - About 1 hr to fix

    Function list has 48 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function list(cb) {
      var json = path.join(npm.localPrefix, "package.json")
      var cmdList = [ "publish", "install", "uninstall"
                    , "test", "stop", "start", "restart"
                    ].reduce(function (l, p) {
    Severity: Minor
    Found in deps/npm/lib/run-script.js - About 1 hr to fix

      Function search has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function search (data, fields, version, title) {
        var field
          , tail = fields
        while (!field && fields.length) field = tail.shift()
        fields = [field].concat(tail)
      Severity: Minor
      Found in deps/npm/lib/view.js - About 1 hr to fix

        Function load has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function load () {
          var cli, builtin, cb
          for (var i = 0; i < arguments.length; i++)
            switch (typeof arguments[i]) {
              case "string": builtin = arguments[i]; break
        Severity: Minor
        Found in deps/npm/lib/config/core.js - About 1 hr to fix

          Function saver has 48 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function saver (args, nm, cb_) {
            return cb
            function cb (er, data) {
              var s = npm.config.get('save')
                , d = npm.config.get('save-dev')
          Severity: Minor
          Found in deps/npm/lib/uninstall.js - About 1 hr to fix

            Function BuildOptions has 48 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            def BuildOptions():
              result = optparse.OptionParser()
              result.add_option("--arch",
                                help=("The architecture to run tests for, "
                                      "'auto' or 'native' for auto-detect"),
            Severity: Minor
            Found in deps/v8/tools/run-tests.py - About 1 hr to fix

              Function ChildProcess has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

              function ChildProcess() {
                EventEmitter.call(this);
              
                // Initialize TCPWrap and PipeWrap
                process.binding('tcp_wrap');
              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 Interface has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

              function Interface(input, output, completer, terminal) {
                if (!(this instanceof Interface)) {
                  return new Interface(input, output, completer, terminal);
                }
              
              
              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 Interface has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

              function Interface(stdin, stdout, args) {
                var self = this;
              
                this.stdin = stdin;
                this.stdout = stdout;
              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 _compile has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

              Module.prototype._compile = function(content, filename) {
                var self = this;
                // remove shebang
                content = content.replace(/^\#\!.*/, '');
              
              
              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 howMuchToRead has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

              function howMuchToRead(n, state) {
                if (state.length === 0 && state.ended)
                  return 0;
              
                if (state.objectMode)
              Severity: Minor
              Found in lib/_stream_readable.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 processImmediate has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

              function processImmediate() {
                var queue = immediateQueue;
                var domain, immediate;
              
                immediateQueue = {};
              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 RSAGenerate has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

              function RSAGenerate(B,E) {
                var rng = new SecureRandom();
                var qs = B>>1;
                this.e = parseInt(E,16);
                var ee = new BigInteger(E,16);
              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 sc_format has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

              function sc_format(s, args) {
                 var len = s.length;
                 var p = new sc_StringOutputPort();
                 var i = 0, j = 1;
              
              
              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 bnGCD has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

              function bnGCD(a) {
                var x = (this.s<0)?this.negate():this.clone();
                var y = (a.s<0)?a.negate():a.clone();
                if(x.compareTo(y) < 0) { var t = x; x = y; y = t; }
                var i = x.getLowestSetBit(), g = y.getLowestSetBit();
              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 parseVmSymbols has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

              CppEntriesProvider.prototype.parseVmSymbols = function(
                  libName, libStart, libEnd, processorFunc) {
                this.loadSymbols(libName);
              
                var prevEntry;
              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 bnpMillerRabin has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

              function bnpMillerRabin(t) {
                var n1 = this.subtract(BigInteger.ONE);
                var k = n1.getLowestSetBit();
                if(k <= 0) return false;
                var r = n1.shiftRight(k);
              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 isManaged has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

              function isManaged (target) {
                return function predicate (path, cb) {
                  if (!path) {
                    log.verbose('isManaged', 'no path passed for target', target)
                    return cb(null, false)
              Severity: Minor
              Found in deps/npm/lib/utils/gently-rm.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 getCredentialsByURI has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

              function getCredentialsByURI (uri) {
                assert(uri && typeof uri === "string", "registry URL is required")
                var nerfed = toNerfDart(uri)
                var defnerf = toNerfDart(this.get("registry"))
              
              
              Severity: Minor
              Found in deps/npm/lib/config/get-credentials-by-uri.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 CutCommonSpacePrefix has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

              def CutCommonSpacePrefix(text):
                """Removes a common space prefix from the lines of a multiline text.
              
                If the first line does not start with a space, it is left as it is and
                only in the remaining lines a common space prefix is being searched
              Severity: Minor
              Found in tools/closure_linter/gflags.py - 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