Convert a CppCheck XML report to a GitLab-compatible Code Quality JSON report. Version 1.6.0 supports Python 3.7 to 3.14. Releases are sporadic.
Install & Compatibility
Where this runs
tested against v1.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
from cppcheck_codequality import convert_file
Read a CppCheck XML report file, convert to GitLab Code Quality JSON, and write to file.
import subprocess
import cppcheck_codequality
# Run cppcheck and produce XML output
with open("cppcheck_report.xml", "r") as f:
report_xml = f.read()
# Convert to Code Quality JSON
json_output = cppcheck_codequality.convert(report_xml)
with open("gl-code-quality-report.json", "w") as f:
f.write(json_output)
cppcheck-codequality --version
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.