Showing 25 of 73 total issues
Function process_domains
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def process_domains(domains, agencies, subdomains, parent_scan_data, subdomain_scan_data):
Function a11y_report_for
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def a11y_report_for(domain_name, domain, parent_scan_data):
if parent_scan_data[domain_name].get('a11y') is None:
return None
a11y_report = {
- 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 scan_parents
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def scan_parents(options):
scanners = "--scan=%s" % (str.join(",", SCANNERS))
analytics = "--analytics=%s" % ANALYTICS_URL
output = "--output=%s" % PARENTS_DATA
a11y_redirects = "--a11y-redirects=%s" % A11Y_REDIRECTS
- 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 total_preloading_report
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def total_preloading_report(eligible):
total_report = {
'eligible': len(eligible),
'preloaded': 0,
'preload_ready': 0
- 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 init
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
init: function(data, options) {
// assign data
if (!options.data) options.data = data;
// add common options to all renderTables requests
- 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"