diff --git a/bandit/formatters/text.py b/bandit/formatters/text.py index c8f897400..5f47bbc00 100644 --- a/bandit/formatters/text.py +++ b/bandit/formatters/text.py @@ -74,7 +74,8 @@ def _output_issue_str(issue, indent, show_lineno=True, show_code=True, indent, issue.test_id, issue.test, issue.text)) bits.append("%s Severity: %s CWE: %i Confidence: %s" % ( - indent, issue.severity.capitalize(), issue.cwe, issue.confidence.capitalize())) + indent, issue.severity.capitalize(), issue.cwe, + issue.confidence.capitalize())) bits.append("%s Location: %s:%s" % ( indent, issue.fname, issue.lineno if show_lineno else "")) diff --git a/bandit/formatters/xml.py b/bandit/formatters/xml.py index 6ce356932..720ccbe82 100644 --- a/bandit/formatters/xml.py +++ b/bandit/formatters/xml.py @@ -60,9 +60,11 @@ def report(manager, fileobj, sev_level, conf_level, lines=-1): testcase = ET.SubElement(root, 'testcase', classname=issue.fname, name=test) - text = 'Test ID: %s Severity: %s CWE: %s Confidence: %s\n%s\nLocation %s:%s' - text = text % (issue.test_id, issue.severity, issue.cwe, issue.confidence, - issue.text, issue.fname, issue.lineno) + text = 'Test ID: %s Severity: %s CWE: %s ' \ + 'Confidence: %s\n%s\nLocation %s:%s' + text = text % (issue.test_id, issue.severity, issue.cwe, + issue.confidence, issue.text, issue.fname, + issue.lineno) ET.SubElement(testcase, 'error', more_info=docs_utils.get_url(issue.test_id), type=issue.severity,