Showing 287 of 802 total issues
Function check_header_count_range
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def check_header_count_range(self, msg, header, minr, maxr, target=None):
Function check_rbl_envfrom
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def check_rbl_envfrom(self, msg, zone_set, rbl_server, subtest=None,
Function check_rbl_from_domain
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def check_rbl_from_domain(self, msg, zone_set, rbl_server, subtest=None,
Function _update_base64_text_stats
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _update_base64_text_stats(self, msg, content_type,
Function _compute_declassification_distance
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _compute_declassification_distance(self, Ns, Nn, ns, nn, prob):
Function check_for_from_domain_in_received_headers
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def check_for_from_domain_in_received_headers(self, msg, domain, desired,
Function check_razor2_range
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def check_razor2_range(self, msg, engine, min, max, target=None):
Function check_blank_line_ratio
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def check_blank_line_ratio(self, msg, minr, maxr, minlines=1, target=None):
Function check_rbl
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def check_rbl(self, msg, zone_set, rbl_server, subtest=None, target=None):
Function image_to_text_ratio
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def image_to_text_ratio(self, msg, img_type, min_ratio, max_ratio=None,
Function check_illegal_chars
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def check_illegal_chars(self, msg, header, ratio, count, target=None):
Function image_size_exact
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def image_size_exact(self, msg, img_type, height, width,
Function pixel_coverage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def pixel_coverage(self, msg, img_type, min_coverage, max_coverage=None,
Function _compute_prob_for_token
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _compute_prob_for_token(self, token, ns, nn, s, n):
Function image_count
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def image_count(self, msg, img_type, min_count, max_count=None,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, name, score=None, desc=None, priority=0, tflags=None):
Function _handle_include
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _handle_include(self, value, line, line_no, _depth=0,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, rule, match_func, stype, spam_score, ham_score):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, address, sitepath, configpath, paranoid=False,
Function check_for_fake_aol_relay_in_rcvd
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def check_for_fake_aol_relay_in_rcvd(self, msg, target=None):
"""Check for common AOL fake received header."""
for recv in msg.get_decoded_header("Received"):
if not Regex(r" rly-[a-z][a-z]\d\d\.", re.I).search(recv):
continue
- 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"