Skip to main content

Converts Cppcheck XML output to JUnit format.

Project description

https://github.com/johnthagen/cppcheck-junit/workflows/python/badge.svg https://codeclimate.com/github/johnthagen/cppcheck-junit/badges/gpa.svg https://codeclimate.com/github/johnthagen/cppcheck-junit/badges/issue_count.svg https://img.shields.io/pypi/v/cppcheck-junit.svg https://img.shields.io/pypi/status/cppcheck-junit.svg https://img.shields.io/pypi/pyversions/cppcheck-junit.svg

Tool that converts cppcheck XML output to JUnit XML format. Use on your CI servers to get more helpful feedback.

Installation

You can install, upgrade, and uninstall cppcheck-junit with these commands:

$ pip install cppcheck-junit
$ pip install --upgrade cppcheck-junit
$ pip uninstall cppcheck-junit

Usage

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.

Releases

2.2.0 - 2022-03-29

  • Add optional argument for setting return code when cppcheck found errors.

  • Drop Python 3.6 and support Python 3.10.

2.1.0 - 2020-12-30

  • Drop Python 3.5 and support Python 3.9.

2.0.0 - 2020-03-29

  • Drop Python 2.7

1.7.0 - 2019-12-14

  • Drop Python 3.4 and support Python 3.8.

  • Include license file.

1.6.0 - 2018-07-09

Drop Python 3.3 and support Python 3.7.

1.5.0 - 2017-10-18

Fix Bamboo support by always filling in name and classname attributes on JUnit error test cases.

1.4.0 - 2017-06-14

Expand JUnit schema support by adding in some missing fields.

1.3.0 - 2016-12-31

Support Python 3.6.

1.2.0 - 2016-07-27

Actually handle cppcheck errors that don’t have a <location> tag. Update test suite to use tox.

1.1.2 - 2016-04-13

Handle cppcheck errors that don’t have a <location> tag.

1.1.1 - 2016-04-11

Fix requirements.txt include for setup.py.

1.1.0 - 2016-04-11

If no cppcheck errors are parsed, output a single success test case to satisfy Bamboo.

1.0.0 - 2016-02-15

Release 1.0.0. Increase test coverage.

0.2.0 - 2016-01-28

Added severity to JUnit message, improved help description, handle XML parsing errors.

0.1.0 - 2015-11-15

First release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cppcheck-junit-2.2.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

cppcheck_junit-2.2.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file cppcheck-junit-2.2.0.tar.gz.

File metadata

  • Download URL: cppcheck-junit-2.2.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.3

File hashes

Hashes for cppcheck-junit-2.2.0.tar.gz
Algorithm Hash digest
SHA256 46fe2c381081dc3b48e2d1ec12e56ff00da460b985c6599386056638d5a31cde
MD5 41232ef6ecdd5c0101a6400fda3ce552
BLAKE2b-256 d5109ce6a82c830875923eaa4c255ea25d3ca2c023edfee0c011005e5789ef85

See more details on using hashes here.

Provenance

File details

Details for the file cppcheck_junit-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: cppcheck_junit-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.3

File hashes

Hashes for cppcheck_junit-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1ba48e92cd4ada9d336819b63e64981a1a24bfe894613ff791819fd4158368f
MD5 d04b17d738b6b25044af5e413b74e4e7
BLAKE2b-256 55f6e24af00fcf5eb57a4acd64819103c82642f53a459fe23d549deb34d75b9a

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page