Showing 1,896 of 2,859 total issues
Function _XcodeVersion
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def _XcodeVersion(self):
# `xcodebuild -version` output looks like
# Xcode 4.6.3
# Build version 4H1503
# or like
- Read upRead up
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 rule
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def rule(self, name, command, description=None, depfile=None,
Function ProcessFile
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def ProcessFile(filename, vlevel):
"""Does google-lint on a single file.
Args:
filename: The name of the file to parse.
- Read upRead up
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 WriteGraph
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def WriteGraph(edges):
"""Print a graphviz graph to stdout.
|edges| is a map of target to a list of other targets it depends on."""
# Bucket targets by file.
- Read upRead up
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 memoize
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def memoize(default=None):
"""This decorator caches the return value of a parameterless pure function"""
def memoizer(func):
val = []
@functools.wraps(func)
- Read upRead up
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 RunStep
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def RunStep(self):
os.chdir(self["chrome_path"])
trunk_releases = filter(lambda r: r["branch"] == "trunk", self["releases"])
if not trunk_releases: # pragma: no cover
- Read upRead up
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 CppLintWorker
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def CppLintWorker(command):
try:
process = subprocess.Popen(command, stderr=subprocess.PIPE)
process.wait()
out_lines = ""
- Read upRead up
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 FindObject
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def FindObject(self, tagged_address):
if tagged_address in self.objects:
return self.objects[tagged_address]
if (tagged_address & self.ObjectAlignmentMask()) != 1: return None
address = tagged_address - 1
- Read upRead up
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 format_disasm_line
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def format_disasm_line(
self, f, start, line, next_address, highlight_address):
line_address = start + line[0]
address_fmt = " <td>%s</td>\n"
if line_address == highlight_address:
- Read upRead up
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 is_y2_used
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def is_y2_used(plot):
for subplot in plot:
if isinstance(subplot, Plot):
for item in subplot.items:
if item.axis == x1y2 or item.axis == x2y2:
- Read upRead up
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 _RunInternal
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def _RunInternal(self, jobs):
pool = Pool(jobs)
test_map = {}
# TODO(machenbach): Instead of filling the queue completely before
# pool.imap_unordered, make this a generator that already starts testing
- Read upRead up
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 31 lines of code (exceeds 25 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);
Function processKillAndExit
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
startup.processKillAndExit = function() {
process.exit = function(code) {
if (code || code === 0)
process.exitCode = code;
Function defaultEval
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function defaultEval(code, context, file, cb) {
var err, result;
// first, create the Script object to check the syntax
try {
var script = vm.createScript(code, {
Function write
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
fs.write = function(fd, buffer, offset, length, position, callback) {
function strWrapper(err, written) {
// Retain a reference to buffer so that it can't be GC'ed too soon.
callback(err, written || 0, buffer);
}
Function Server
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Server(options, connectionListener) {
if (!(this instanceof Server))
return new Server(options, connectionListener);
events.EventEmitter.call(this);
Function writeHead
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
ServerResponse.prototype.writeHead = function(statusCode, reason, obj) {
var headers;
if (util.isString(reason)) {
// writeHead(statusCode, reasonPhrase[, headers])
Function _addHeaderLine
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
IncomingMessage.prototype._addHeaderLine = function(field, value, dest) {
field = field.toLowerCase();
switch (field) {
// Array headers:
case 'set-cookie':
Function queryServer
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function queryServer(worker, message) {
var args = [message.address,
message.port,
message.addressType,
message.fd];
Function addRequest
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Agent.prototype.addRequest = function(req, options) {
// Legacy API: addRequest(req, host, port, path)
if (typeof options === 'string') {
options = {
host: options,