Showing 2,859 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 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 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 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 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 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 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 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 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 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 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 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 FinishFile has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
          Open

            def FinishFile(self):
              """Called when the current file has finished style checking.
          
              Used to go back and fix any errors in the file.
              """
          Severity: Minor
          Found in tools/closure_linter/closure_linter/error_fixer.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

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

          def FilterFiles(files):
            """Filters the list of files to be linted be removing any excluded files.
          
            Filters out files excluded using --exclude_files and  --exclude_directories.
          
          
          Severity: Minor
          Found in tools/closure_linter/closure_linter/common/simplefileflags.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

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

          def _GetRecursiveFiles(suffixes):
            """Returns files to be checked specified by the --recurse flag.
          
            Args:
              suffixes: Expected suffixes for the file type being checked.
          Severity: Minor
          Found in tools/closure_linter/closure_linter/common/simplefileflags.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