Showing 376 of 566 total issues
Function collect_targets
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def collect_targets(self, targets):
s = [t.creating_subvariant() for t in targets]
s = unique(s)
- 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 global_setup:
setup_cpu = global_setup
# If needed we can easily add using configuration flags
# here for overriding which options get passed to the
# global setup command for which target platform:
Function run_fail
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def run_fail(sources, args, input_files, requirements, target_name=None, default_build=[]):
Function create_subvariant
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_subvariant (self, root_targets, all_targets,
Avoid deeply nested control flow statements. Open
if match:
p0 = match[1]
break
if p0:
Function _rewriteIDs
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _rewriteIDs( self, node ):
if node.nodeName in ('link'):
if (self.idmap.has_key(node.getAttribute('linkend'))):
#~ A link, and we have someplace to repoint it at.
node.setAttribute('linkend',self.idmap[node.getAttribute('linkend')])
- 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 n.getAttribute('kind') in ('class','struct'):
classes.append(entry)
entries.append(entry)
Avoid deeply nested control flow statements. Open
for m in n.childNodes:
if m.nodeName == 'member':
cpp = self._cppName(self._getChildData('name',root=m))
entry = {
'name' : cpp['name'],
Avoid deeply nested control flow statements. Open
for t in result:
t.always()
Avoid deeply nested control flow statements. Open
with _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\\{}{}'.format(x, globals()[versionVarName])) as reg_key:
vc_path = _winreg.QueryValueEx(reg_key, "ProductDir")[0]
except:
Function run
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(sources, args, input_files, requirements, target_name=None, default_build=[]):
Avoid deeply nested control flow statements. Open
if p:
assert(len(p) == 1)
result += join_tag(ungrist(f), p)
else:
Function process_boostbook_build_log
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def process_boostbook_build_log( path, timestamp ):
f = open( path + '.xml', 'w' )
g = xml.sax.saxutils.XMLGenerator( f )
lines = open( path ).read().splitlines()
output_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
Avoid deeply nested control flow statements. Open
if p1 == p2:
result = t
Function cast
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def cast(name, type, sources, requirements, default_build, usage_requirements):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__ (self, name, project, sources, requirements = None, default_build = None, usage_requirements = None):
Function run
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def run(self, project, name, prop_set, sources):
# The lib generator is composing, and can be only invoked with
# explicit name. This check is present in generator.run (and so in
# builtin.LinkingGenerator), but duplicate it here to avoid doing
- 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 self.include_type(ty, included_types):
result.append(r)
else:
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__ (self, main_target, prop_set, sources, build_properties, sources_usage_requirements, created_targets):
Function upload_to_ftp
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def upload_to_ftp(results_path, test_name, ftp_url, user, psw, debug_level):