Showing 376 of 566 total issues
Function get_child_data
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_child_data( self, root, tag = None, id = None, name = None, strip = False, default = None ):
Avoid deeply nested control flow statements. Open
Open
if nmm:
name = nmm.group(1)
email = nmm.group(3)
email = at_regex.sub('@', email)
maintainer = self.getPlatformMaintainer(name, email)
Avoid deeply nested control flow statements. Open
Open
if node.nodeType == xml.dom.Node.ELEMENT_NODE:
if node.firstChild:
log_data = xml.sax.saxutils.escape(node.firstChild.data)
else:
log_data = ''
Avoid deeply nested control flow statements. Open
Open
if ("KKK" in result[0] or "KKK" in result[1]):
if not ("ENC(" in result[0] or "ENC(" in result[1]):
p = subprocess.Popen([encrypter, 'test', key, result[2][1:-1]], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
new_line += ("%s%sENC(%s)" % (result[0], result[1], '"'+out.rstrip("\n")+'"'))
Avoid deeply nested control flow statements. Open
Open
if nmm:
name = nmm.group(1)
email = nmm.group(3)
email = at_regex.sub('@', email)
maintainer = self.getMaintainer(name, email)
Function composeTestingSummaryEmail
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def composeTestingSummaryEmail(self):
"""
Compose a message to send to the Boost Testing list. Returns
the message text if a message is needed, returns None
otherwise.
- 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
Open
for failure in test.failures:
platform = failure.platform
if not platform.isBroken():
message += ' ' + platform.name
message += '\n'
Avoid deeply nested control flow statements. Open
Open
if items:
for item in items:
if item:
test_run.appendChild(self.results.createTextNode("\n"))
test_run.appendChild(item)
Avoid deeply nested control flow statements. Open
Open
for failure in test.failures:
if not failure.platform.isBroken():
message += ' ' + failure.platform.name
pass
pass
Function upload_to_ftp
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def upload_to_ftp(results_path, test_name, ftp_url, user, psw, debug_level):
Avoid deeply nested control flow statements. Open
Open
if action_node.getAttribute('status') != '0':
result = 'fail'
else:
Consider simplifying this complex logical expression. Open
Open
if client_ts == int(ts) and ( client_cks and (client_cks == "-2" or ( client_cks != "-3" and client_cks != "0" and client_cks != "-1" )) ):
if trial is not None and trial.isdigit() and client_trial < int(trial):
printl("is_ts_valid:more trials")
return True
else:
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__ (self, id, composing, source_types, target_types_and_names, requirements = []):
Function construct_types
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def construct_types (project, name, target_types, prop_set, sources):
Function is_ts_valid
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def is_ts_valid(ts, client_ts, trial, client_trial, client_cks=None):
Function _write_jamfile
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _write_jamfile(self, path, target_rule, requirements, input, output):
Function subfeature
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def subfeature (feature_name, value_string, subfeature, subvalues, attributes = []):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, message, context,
Function __construct_really
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __construct_really (project, name, target_type, prop_set, sources):
Function convert_to_consumable_types
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def convert_to_consumable_types (self, project, name, prop_set, sources, only_one=False):