Skip to content
This repository was archived by the owner on Jan 1, 2026. It is now read-only.

Commit c5c8c5c

Browse files
committed
Add severity to the JUnit error message.
1 parent b6fc6e8 commit c5c8c5c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cppcheck_junit.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ def generate_test_suite(errors, output_file):
105105
'error',
106106
file=os.path.relpath(error.file),
107107
line=str(error.line),
108-
message='{}: {}'.format(error.line, error.message))
108+
message='{}: ({}) {}'.format(error.line,
109+
error.severity,
110+
error.message))
109111

110112
tree = ElementTree.ElementTree(test_suite)
111113
tree.write(output_file, encoding='utf-8', xml_declaration=True)

0 commit comments

Comments
 (0)