Showing 1,896 of 2,859 total issues

File icutrim.py has 272 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/usr/bin/python
#
# Copyright (C) 2014 IBM Corporation and Others. All Rights Reserved.
#
# @author Steven R. Loomis <srl@icu-project.org>
Severity: Minor
Found in tools/icu/icutrim.py - About 2 hrs to fix

    Function realpathSync has 63 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    fs.realpathSync = function realpathSync(p, cache) {
      // make p is absolute
      p = pathModule.resolve(p);
    
      if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
    Severity: Major
    Found in lib/fs.js - About 2 hrs to fix

      Function send has 63 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Socket.prototype.send = function(buffer,
                                       offset,
                                       length,
                                       port,
                                       address,
      Severity: Major
      Found in lib/dgram.js - About 2 hrs to fix

        Function makeArchy_ has 63 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function makeArchy_ (data, long, dir, depth, parent, d) {
          if (typeof data === "string") {
            if (depth -1 <= npm.config.get("depth")) {
              // just missing
              var unmet = "UNMET DEPENDENCY"
        Severity: Major
        Found in deps/npm/lib/ls.js - About 2 hrs to fix

          Function load_ has 63 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function load_(builtin, rc, cli, cb) {
            var defaults = configDefs.defaults
            var conf = new Conf(rc)
          
            conf.usingBuiltin = !!builtin
          Severity: Major
          Found in deps/npm/lib/config/core.js - About 2 hrs to fix

            Function client has 61 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function client() {
              var chunk;
              switch (type) {
                case 'buf':
                  chunk = new Buffer(len);
            Severity: Major
            Found in benchmark/net/tcp-raw-pipe.js - About 2 hrs to fix

              Function _parseMap has 61 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _parseMap: function(map, lineNumber, columnNumber)
                  {
                      var sourceIndex = 0;
                      var sourceLineNumber = 0;
                      var sourceColumnNumber = 0;
              Severity: Major
              Found in deps/v8/tools/SourceMap.js - About 2 hrs to fix

                Function processLine has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function processLine(text, begin, end) {
                    var line = text.substring(begin, end);
                    if (readingSource) {
                      if (separatorFilter.exec(line) != null) {
                        readingSource = false;
                Severity: Major
                Found in deps/v8/tools/sodium/sodium.js - About 2 hrs to fix

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

                  owner.completion = function (opts, cb) {
                    var argv = opts.conf.argv.remain
                    if (argv.length > 4) return cb()
                    if (argv.length <= 2) {
                      var subs = ["add", "rm"]
                  Severity: Major
                  Found in deps/npm/lib/owner.js - About 2 hrs to fix

                    Function spawnSync has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function spawnSync(/*file, args, options*/) {
                      var opts = normalizeSpawnArguments.apply(null, arguments);
                    
                      var options = opts.options;
                    
                    
                    Severity: Minor
                    Found in lib/child_process.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 finishSection has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function finishSection(section, parent) {
                      if (!section || !parent) {
                        throw new Error('Invalid finishSection call\n'+
                                        JSON.stringify(section) + '\n' +
                                        JSON.stringify(parent));
                    Severity: Minor
                    Found in tools/doc/json.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 highlight has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function highlight(prefix, suffix, tag) {
                      var nodeList = document.getElementsByTagName(tag);
                      for (var i = 0; i < nodeList.length; i++) {
                        var element = nodeList.item(i);
                        var htmlClasses = sh_getClasses(element);
                    Severity: Minor
                    Found in doc/sh_main.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 decode has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                    Open

                    QueryString.parse = QueryString.decode = function(qs, sep, eq, options) {
                      sep = sep || '&';
                      eq = eq || '=';
                      var obj = {};
                    
                    
                    Severity: Minor
                    Found in lib/querystring.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 traverseBreadthFirst has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                    Open

                    SplayTree.prototype.traverseBreadthFirst = function (f) {
                      if (f(this.root_.value)) return;
                    
                      var stack = [this.root_];
                      var length = 1;
                    Severity: Minor
                    Found in deps/v8/benchmarks/spinning-balls/splay-tree.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 makeParseable_ has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function makeParseable_ (data, long, dir, depth, parent, d) {
                      if (data.hasOwnProperty("_found") && data._found !== true) return ""
                    
                      if (typeof data === "string") {
                        if (data.depth < npm.config.get("depth")) {
                    Severity: Minor
                    Found in deps/npm/lib/ls.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 filter has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function filter (data, args, set, seen) {
                      if (!set) set = {}
                      if (!seen) seen = {}
                      if (set.hasOwnProperty(data.path)) return set
                      if (seen.hasOwnProperty(data.path)) return set
                    Severity: Minor
                    Found in deps/npm/lib/rebuild.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 run has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function run (pkg, wd, cmd, args, cb) {
                      if (!pkg.scripts) pkg.scripts = {}
                    
                      var cmds
                      if (cmd === "restart" && !pkg.scripts.restart) {
                    Severity: Minor
                    Found in deps/npm/lib/run-script.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 search has a Cognitive Complexity of 18 (exceeds 5 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 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 findPeerInvalid_ has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function findPeerInvalid_ (packageMap, fpiList) {
                      if (fpiList.indexOf(packageMap) !== -1)
                        return undefined
                    
                      fpiList.push(packageMap)
                    Severity: Minor
                    Found in deps/npm/lib/install.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 CompareParameters has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def CompareParameters(self, params):
                        """Computes the edit distance and list from the function params to the docs.
                    
                        Uses the Levenshtein edit distance algorithm, with code modified from
                        http://en.wikibooks.org/wiki/Algorithm_implementation/Strings/Levenshtein_distance#Python
                    Severity: Minor
                    Found in tools/closure_linter/closure_linter/statetracker.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

                    Severity
                    Category
                    Status
                    Source
                    Language