Showing 1,896 of 2,859 total issues

Function runBlock8 has 79 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function runBlock8() {
    for (var i = 0; i < 7; i++) {
      s21[i].match(/\d+/g);
      'nsgre'.replace(re64, '');
      'orsber'.replace(re64, '');
Severity: Major
Found in deps/v8/benchmarks/regexp.js - About 3 hrs to fix

    Function Zlib has 78 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function Zlib(opts, mode) {
      this._opts = opts = opts || {};
      this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK;
    
      Transform.call(this, opts);
    Severity: Major
    Found in lib/zlib.js - About 3 hrs to fix

      Function createSecureContext has 78 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      exports.createSecureContext = function createSecureContext(options, context) {
        if (!options) options = {};
      
        var secureOptions = options.secureOptions;
        if (options.honorCipherOrder)
      Severity: Major
      Found in lib/_tls_common.js - About 3 hrs to fix

        Function RtfGenerator has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
        Open

        function RtfGenerator() {
          var self = this,
              did_write_anything = false;
        
          Stream.call(this);
        Severity: Minor
        Found in tools/license2rtf.js - About 3 hrs 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 removeListener has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
        Open

            function removeListener(type, listener) {
          var list, position, length, i;
        
          if (!util.isFunction(listener))
            throw TypeError('listener must be a function');
        Severity: Minor
        Found in lib/events.js - About 3 hrs 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 workerInit has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
        Open

        function workerInit() {
          var handles = {};
        
          // Called from src/node.js
          cluster._setupWorker = function() {
        Severity: Minor
        Found in lib/cluster.js - About 3 hrs 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 listOnTimeout has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
        Open

        function listOnTimeout() {
          var msecs = this.msecs;
          var list = this;
        
          debug('timeout callback %d', msecs);
        Severity: Minor
        Found in lib/timers.js - About 3 hrs 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 WriteActions has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
        Open

          def WriteActions(self, actions, extra_sources, extra_outputs,
                           extra_mac_bundle_resources, part_of_all):
            """Write Makefile code for any 'actions' from the gyp input.
        
            extra_sources: a list that will be filled in with newly generated source
        Severity: Minor
        Found in tools/gyp/pylib/gyp/generator/make.py - About 3 hrs 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 main has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
        Open

        def main(argv = None):
          """Main function.
        
          Args:
            argv: Sequence of command line arguments.
        Severity: Minor
        Found in tools/closure_linter/closure_linter/gjslint.py - About 3 hrs 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 WriteActions has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
        Open

          def WriteActions(self, actions, extra_sources, extra_outputs):
            """Write Makefile code for any 'actions' from the gyp input.
        
            extra_sources: a list that will be filled in with newly generated source
                           files, if any
        Severity: Minor
        Found in tools/gyp/pylib/gyp/generator/android.py - About 3 hrs 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 Assign has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
        Open

        def Assign(suites, peers):
          total_work = 0.0
          for s in suites:
            total_work += s.CalculateTotalDuration()
        
        
        Severity: Minor
        Found in deps/v8/tools/testrunner/network/distro.py - About 3 hrs 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 77 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function Interface(input, output, completer, terminal) {
          if (!(this instanceof Interface)) {
            return new Interface(input, output, completer, terminal);
          }
        
        
        Severity: Major
        Found in lib/readline.js - About 3 hrs to fix

          Function readFile has 77 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          fs.readFile = function(path, options, callback_) {
            var callback = maybeCallback(arguments[arguments.length - 1]);
          
            if (util.isFunction(options) || !options) {
              options = { encoding: null, flag: 'r' };
          Severity: Major
          Found in lib/fs.js - About 3 hrs to fix

            File lifecycle.js has 295 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            exports = module.exports = lifecycle
            exports.cmd = cmd
            exports.makeEnv = makeEnv
            
            var log = require("npmlog")
            Severity: Minor
            Found in deps/npm/lib/utils/lifecycle.js - About 3 hrs to fix

              Function DebugEventDetails has 76 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function DebugEventDetails(response) {
                var details = {text:'', running:false};
              
                // Get the running state.
                details.running = response.running();
              Severity: Major
              Found in deps/v8/src/d8.js - About 3 hrs to fix

                Function defineDefaultCommands has 75 lines of code (exceeds 25 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: Major
                Found in lib/repl.js - About 3 hrs to fix

                  Consider simplifying this complex logical expression.
                  Open

                        if (byte == 0x8b or           # mov
                            byte == 0x89 or           # mov reg-reg
                            (byte & 0xf0) == 0x50 or  # push/pop
                            (sixty_four and (byte & 0xf0) == 0x40) or  # rex prefix
                            byte == 0xc3 or           # return
                  Severity: Critical
                  Found in deps/v8/tools/grokdump.py - About 3 hrs to fix

                    Function sc_format has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function sc_format(s, args) {
                       var len = s.length;
                       var p = new sc_StringOutputPort();
                       var i = 0, j = 1;
                    
                    
                    Severity: Major
                    Found in deps/v8/benchmarks/earley-boyer.js - About 2 hrs to fix

                      Function TickProcessor has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function TickProcessor(
                          cppEntriesProvider,
                          separateIc,
                          callGraphSize,
                          ignoreUnknown,
                      Severity: Major
                      Found in deps/v8/tools/tickprocessor.js - About 2 hrs to fix

                        File richards.js has 290 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        // Copyright 2006-2008 the V8 project authors. All rights reserved.
                        // Redistribution and use in source and binary forms, with or without
                        // modification, are permitted provided that the following conditions are
                        // met:
                        //
                        Severity: Minor
                        Found in deps/v8/benchmarks/richards.js - About 2 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language