test_junkie/reporter/xml_reporter.py
Avoid deeply nested control flow statements. Open
Open
for param, param_data in class_param_data.items():
test_status = param_data["status"]
if test_status != TestCategory.SUCCESS:
test_status = "failure"
Refactor this function to reduce its Cognitive Complexity from 62 to the 15 allowed. Open
Open
def create_xml_report(write_file, suites):
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.