Showing 1,896 of 2,859 total issues

Function _parseMap has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
Open

    _parseMap: function(map, lineNumber, columnNumber)
    {
        var sourceIndex = 0;
        var sourceLineNumber = 0;
        var sourceColumnNumber = 0;
Severity: Minor
Found in deps/v8/tools/SourceMap.js - About 4 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 ProcessToolsetsInDict has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
Open

def ProcessToolsetsInDict(data):
  if 'targets' in data:
    target_list = data['targets']
    new_target_list = []
    for target in target_list:
Severity: Minor
Found in tools/gyp/pylib/gyp/input.py - About 4 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 SetUpConfigurations has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
Open

def SetUpConfigurations(target, target_dict):
  # key_suffixes is a list of key suffixes that might appear on key names.
  # These suffixes are handled in conditional evaluations (for =, +, and ?)
  # and rules/exclude processing (for ! and /).  Keys with these suffixes
  # should be treated the same as keys without.
Severity: Minor
Found in tools/gyp/pylib/gyp/input.py - About 4 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 VerifyNoGYPFileCircularDependencies has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
Open

def VerifyNoGYPFileCircularDependencies(targets):
  # Create a DependencyGraphNode for each gyp file containing a target.  Put
  # it into a dict for easy access.
  dependency_nodes = {}
  for target in targets.iterkeys():
Severity: Minor
Found in tools/gyp/pylib/gyp/input.py - About 4 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 ShardTargets has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
Open

def ShardTargets(target_list, target_dicts):
  """Shard some targets apart to work around the linkers limits.

  Arguments:
    target_list: List of target pairs: 'base/base.gyp:base'.
Severity: Minor
Found in tools/gyp/pylib/gyp/MSVSUtil.py - About 4 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 do_GET has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
Open

  def do_GET(self):
    try:
      parsedurl = urlparse.urlparse(self.path)
      query_components = urlparse.parse_qs(parsedurl.query)
      if parsedurl.path == "/dumps.html":
Severity: Minor
Found in deps/v8/tools/grokdump.py - About 4 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 connect has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

Socket.prototype.connect = function(options, cb) {
  if (this.write !== Socket.prototype.write)
    this.write = Socket.prototype.write;

  if (!util.isObject(options)) {
Severity: Minor
Found in lib/net.js - About 4 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 readableAddChunk has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

function readableAddChunk(stream, state, chunk, encoding, addToFront) {
  var er = chunkInvalid(state, chunk);
  if (er) {
    stream.emit('error', er);
  } else if (chunk === null) {
Severity: Minor
Found in lib/_stream_readable.js - About 4 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 read has a Cognitive Complexity of 31 (exceeds 5 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: Minor
Found in deps/v8/benchmarks/earley-boyer.js - About 4 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 CheckIncludeLine has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

def CheckIncludeLine(filename, clean_lines, linenum, include_state, error):
  """Check rules that are applicable to #include lines.

  Strings on #include lines are NOT removed from elided line, to make
  certain tasks easier. However, to prevent false positives, checks
Severity: Minor
Found in tools/cpplint.py - About 4 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 CleanupVcproj has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

def CleanupVcproj(node):
  """For each sub node, we call recursively this function."""
  for sub_node in node.childNodes:
    AbsoluteNode(sub_node)
    CleanupVcproj(sub_node)
Severity: Minor
Found in tools/gyp/tools/pretty_vcproj.py - About 4 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 _TalkToPeer has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

  def _TalkToPeer(self, peer):
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.settimeout(self.context.timeout + 10)
    code = sock.connect_ex((peer.address, constants.PEER_PORT))
    if code == 0:
Severity: Minor
Found in deps/v8/tools/testrunner/network/network_execution.py - About 4 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 113 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function workerInit() {
  var handles = {};

  // Called from src/node.js
  cluster._setupWorker = function() {
Severity: Major
Found in lib/cluster.js - About 4 hrs to fix

    File v.js has 354 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // Copyright 2011 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/spinning-balls/v.js - About 4 hrs to fix

      Function connect has 112 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      exports.connect = function(/* [port, host], options, cb */) {
        var args = normalizeConnectArgs(arguments);
        var options = args[0];
        var cb = args[1];
      
      
      Severity: Major
      Found in lib/_tls_wrap.js - About 4 hrs to fix

        File sodium.js has 352 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        // Copyright 2013 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/tools/sodium/sodium.js - About 4 hrs to fix

          File profile.js has 351 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          // Copyright 2009 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/tools/profile.js - About 4 hrs to fix

            Function removeList has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
            Open

            def removeList(count=0):
                # don't allow "keep" items to creep in here.
                global remove
                remove = remove - keep
                if(count > 10):
            Severity: Minor
            Found in tools/icu/icutrim.py - About 4 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 _GetAllowableIndentations has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
            Open

              def _GetAllowableIndentations(self):
                """Computes the set of allowable indentations.
            
                Returns:
                  The set of allowable indentations, given the current stack.
            Severity: Minor
            Found in tools/closure_linter/closure_linter/indentation.py - About 4 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 output_words has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
            Open

              def output_words(self, f, start_address, end_address,
                               highlight_address, desc):
                region = self.reader.FindRegion(highlight_address)
                if region is None:
                  f.write("<h3>Address 0x%x not found in the dump.</h3>\n" %
            Severity: Minor
            Found in deps/v8/tools/grokdump.py - About 4 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