Showing 1,896 of 2,859 total issues

Function processStdio has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  startup.processStdio = function() {
    var stdin, stdout, stderr;

    process.__defineGetter__('stdout', function() {
      if (stdout) return stdout;
Severity: Major
Found in src/node.js - About 2 hrs to fix

    Function rayTrace has 72 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        rayTrace: function(info, ray, scene, depth){
            // Calc ambient
            var color = Flog.RayTracer.Color.prototype.multiplyScalar(info.color, scene.background.ambience);
            var oldColor = color;
            var shininess = Math.pow(10, info.shape.material.gloss + 1);
    Severity: Major
    Found in deps/v8/benchmarks/raytrace.js - About 2 hrs to fix

      Function processList has 71 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function processList(section) {
        var list = section.list;
        var values = [];
        var current;
        var stack = [];
      Severity: Major
      Found in tools/doc/json.js - About 2 hrs to fix

        Function mirrorObject has 71 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Client.prototype.mirrorObject = function(handle, depth, cb) {
          var self = this;
        
          var val;
        
        
        Severity: Major
        Found in lib/_debugger.js - About 2 hrs to fix

          Function encode has 71 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function encode(input) {
                  var n,
                      delta,
                      handledCPCount,
                      basicLength,
          Severity: Major
          Found in lib/punycode.js - About 2 hrs to fix

            Function runBlock0 has 71 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function runBlock0() {
                for (var i = 0; i < 6511; i++) {
                  re0.exec(s0[i]);
                }
                for (var i = 0; i < 1844; i++) {
            Severity: Major
            Found in deps/v8/benchmarks/regexp.js - About 2 hrs to fix

              Function installMany has 71 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function installMany (what, where, context, cb) {
                // readDependencies takes care of figuring out whether the list of
                // dependencies we'll iterate below comes from an existing shrinkwrap from a
                // parent level, a new shrinkwrap at this level, or package.json at this
                // level, as well as which shrinkwrap (if any) our dependencies should use.
              Severity: Major
              Found in deps/npm/lib/install.js - About 2 hrs to fix

                OrderedDict has 25 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class OrderedDict(dict):
                    'Dictionary that remembers insertion order'
                    # An inherited dict maps keys to values.
                    # The inherited dict provides __getitem__, __len__, __contains__, and get.
                    # The remaining methods are order-aware.
                Severity: Minor
                Found in tools/gyp/pylib/gyp/ordered_dict.py - About 2 hrs to fix

                  TestSuite has 25 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class TestSuite(object):
                  
                    @staticmethod
                    def LoadTestSuite(root):
                      name = root.split(os.path.sep)[-1]
                  Severity: Minor
                  Found in deps/v8/tools/testrunner/local/testsuite.py - About 2 hrs to fix

                    Function RtfGenerator has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function RtfGenerator() {
                      var self = this,
                          did_write_anything = false;
                    
                      Stream.call(this);
                    Severity: Major
                    Found in tools/license2rtf.js - About 2 hrs to fix

                      Function read has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      sc_Reader.prototype.read = function() {
                          function readList(listBeginType) {
                          function matchesPeer(open, close) {
                              return open === 1/*OPEN_PAR*/ && close === 2/*CLOSE_PAR*/
                                  || open === 3/*OPEN_BRACE*/ && close === 4/*CLOSE_BRACE*/
                      Severity: Major
                      Found in deps/v8/benchmarks/earley-boyer.js - About 2 hrs to fix

                        Function run has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function run(args) {
                          var file = args["file"];
                          var resx = args["resx"];
                          var resy = args["resy"];
                          var distortion = args["distortion"];
                        Severity: Major
                        Found in deps/v8/tools/profviz/worker.js - About 2 hrs to fix

                          Function save has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function save (where, installed, tree, pretty, hasArguments, cb) {
                            if (!hasArguments ||
                                !npm.config.get("save") &&
                                !npm.config.get("save-dev") &&
                                !npm.config.get("save-optional") ||
                          Severity: Major
                          Found in deps/npm/lib/install.js - About 2 hrs to fix

                            Function onCryptoStreamFinish has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function onCryptoStreamFinish() {
                              this._finished = true;
                            
                              if (this === this.pair.cleartext) {
                                debug('cleartext.onfinish');
                            Severity: Minor
                            Found in lib/_tls_legacy.js - About 2 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 bnpFromNumber has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function bnpFromNumber(a,b,c) {
                              if("number" == typeof b) {
                                // new BigInteger(int,int,RNG)
                                if(a < 2) this.fromInt(1);
                                else {
                            Severity: Minor
                            Found in deps/v8/benchmarks/crypto.js - About 2 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 _ConstructContentList has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def _ConstructContentList(xml_parts, specification, pretty, level=0):
                              """ Appends the XML parts corresponding to the specification.
                            
                              Args:
                                xml_parts: A list of XML parts to be appended to.
                            Severity: Minor
                            Found in tools/gyp/pylib/gyp/easy_xml.py - About 2 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 20 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def Main():
                              parser = BuildOptions()
                              (options, args) = parser.parse_args()
                              if not ProcessOptions(options):
                                parser.print_help()
                            Severity: Minor
                            Found in deps/v8/tools/run-deopt-fuzzer.py - About 2 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 __init__ has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                            Open

                              def __init__(self, options, minidump_name):
                                self.minidump_name = minidump_name
                                self.minidump_file = open(minidump_name, "r")
                                self.minidump = mmap.mmap(self.minidump_file.fileno(), 0, mmap.MAP_PRIVATE)
                                self.header = MINIDUMP_HEADER.Read(self.minidump, 0)
                            Severity: Minor
                            Found in deps/v8/tools/grokdump.py - About 2 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 _init has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            TLSSocket.prototype._init = function(socket) {
                              assert(this._handle);
                            
                              // lib/net.js expect this value to be non-zero if write hasn't been flushed
                              // immediately
                            Severity: Major
                            Found in lib/_tls_wrap.js - About 2 hrs to fix

                              Function readInstalled has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function readInstalled (dir, counter, parent, cb) {
                                var pkg, children, realpath
                              
                                fs.realpath(dir, function (er, rp) {
                                  realpath = rp
                              Severity: Major
                              Found in deps/npm/lib/dedupe.js - About 2 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language