Showing 2,859 of 2,859 total issues
Function getExtras
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function getExtras (data) {
var extras = []
if (data.description) extras.push(data.description)
if (data.repository) extras.push(data.repository.url)
- 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 installAndRetest
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function installAndRetest (set, filter, dir, unavoidable, silent, cb) {
Avoid deeply nested control flow statements. Open
if (matches != null) {
readingAsm = true;
asmBegin = -1;
currentFunctionName = matches[1];
}
Function read
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function read (name, ver, forceBypass, cb) {
assert(typeof name === "string", "must include name of module to install")
assert(typeof cb === "function", "must include callback")
if (forceBypass === undefined || forceBypass === null) forceBypass = true
- 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 addPlacedTarball_
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function addPlacedTarball_ (p, pkgData, uid, gid, resolvedSum, cb) {
Function cloneResolved
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function cloneResolved (from, resolvedURL, resolvedTreeish, cachedRemote, tmpdir, cb) {
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, name, default, help, enum_values=None,
Function mirrorRemote
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function mirrorRemote (from, cloneURL, treeish, cachedRemote, silent, cb) {
Function save
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function save (where, installed, tree, pretty, hasArguments, cb) {
Function DEFINE_enum
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def DEFINE_enum(name, default, enum_values, help, flag_values=FLAGS,
Function Write
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def Write(self, qualified_target, base_path, output_filename, spec, configs,
Avoid deeply nested control flow statements. Open
if jsdoc.HasFlag('private') and 'underscore' in jsdoc.suppressions:
self._HandleError(errors.UNNECESSARY_SUPPRESS,
'@suppress {underscore} is not necessary with @private',
jsdoc.suppressions['underscore'])
elif jsdoc.HasFlag('private'):
Function WriteDoCmd
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def WriteDoCmd(self, outputs, inputs, command, part_of_all, comment=None,
Function Serialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def Serialize(self):
if self.value is None:
return ''
if self.boolean:
if self.value:
- 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
Avoid deeply nested control flow statements. Open
if end_token.type in Type.FLAG_DESCRIPTION_TYPES:
end_string = htmlutil.StripTags(end_token.string).rstrip()
Function WriteActions
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def WriteActions(target_name, actions, extra_sources, extra_deps,
Function WriteRules
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def WriteRules(target_name, rules, extra_sources, extra_deps,
Avoid deeply nested control flow statements. Open
if not (comment and comment.lower().count('jsdoc inherited')):
self._HandleError(errors.MISSING_MEMBER_DOCUMENTATION,
"No docs found for member '%s'" % identifier,
token);
elif jsdoc and (not state.InConstructor() or
Function _GetOperatorType
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _GetOperatorType(self, token):
"""Returns the operator type of the given operator token.
Args:
token: The token to get arity for.
- 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 _GetMatchingEndBraceAndContents
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _GetMatchingEndBraceAndContents(start_brace):
"""Returns the matching end brace and contents between the two braces.
If any FLAG_ENDING_TYPE token is encountered before a matching end brace, then
that token is used as the matching ending token. Contents will have all
- 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"