Tool that converts cppcheck XML output to JUnit XML format. Use on your CI servers to get more helpful feedback.
You can install, upgrade, and uninstall cppcheck-junit
with these commands:
$ pip install cppcheck-junit
$ pip install --upgrade cppcheck-junit
$ pip uninstall cppcheck-junit
Enable XML version 2 output, enable additional rules (for example all
), and redirect
cppcheck
stderr
to a file:
$ cppcheck --xml-version=2 --enable=all . 2> cppcheck-result.xml
Convert it to JUnit XML format:
$ cppcheck_junit cppcheck-result.xml cppcheck-junit.xml
If no cppcheck
errors are generated, a single "Cppcheck success"
test case is
output so that CI tools like Bamboo will not fail on the JUnit task.
- Support Python 3.12
- Include error info from multiple locations
- Added
junitparser
as a dependency to write junit output - Update unitests for argument parser
- Enable mypy for type checking
- Drop Python 3.7 support and support Python 3.11
- Add optional argument for setting return code when cppcheck found errors.
- Drop Python 3.6 and support Python 3.10.
- Drop Python 3.5 and support Python 3.9.
- Drop Python 2.7
- Drop Python 3.4 and support Python 3.8.
- Include license file.
Drop Python 3.3 and support Python 3.7.
Fix Bamboo support by always filling in name
and classname
attributes on JUnit error
test cases.
Expand JUnit schema support by adding in some missing fields.
Support Python 3.6.
Actually handle cppcheck
errors that don't have a <location>
tag.
Update test suite to use tox
.
Handle cppcheck
errors that don't have a <location>
tag.
Fix requirements.txt
include for setup.py
.
If no cppcheck
errors are parsed, output a single success test case to satisfy Bamboo.
Release 1.0.0. Increase test coverage.
Added severity to JUnit message, improved help description, handle XML parsing errors.
First release.