Skip to main content

valgrind-codequality

badge-pypi   badge-pypi-downloads

badge-pipeline   badge-coverage   badge-pylint   badge-formatting   badge-issues-cnt

About

I wanted reports from Valgrind to appear in GitLab Merge Requests as Code Quality reports, which is a JSON file defined by the Code Quality's GitLab.

That's all this does: convert Valgrind XML report to Code Quality JSON.

Contributions are welcome.

"Buy Me A Coffee"

Usage

It is primarily used as a console script. As such, ensure you have Python 3's "scripts" directory in your PATH variable. For example, on Linux, that might be $HOME/.local/bin.

To test, try the --help or --version flags:

valgrind-codequality --help

This script follows that example and provides similar command-line options. A typical workflow might look like this:

# Generate valgrind report as XML
valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --xml=yes --xml-file=valgrind_out.xml your_exe
# Convert to a Code Climate JSON report
valgrind-codequality --input-file valgrind_out.xml --output-file valgrind.json

If you wanted, you could invoke the script directly as a module, like this:

# Run as a module instead (note the underscore in the module name here)
python -m valgrind_codequality --input-file=valgrind_out.xml --output-file=valgrind.json

Now, in your GitLab CI script, upload this file as a Code Quality report.

my-code-quality:
  script:
    - [...]
  artifacts:
    reports:
      codequality: valgrind.json

Contributing

Credits & Trademarks

valgrind is an open-source project with a GPL v3.0 license.

"GitLab" is a trademark of GitLab B.V.

All other trademarks belong to their respective owners.

Release files for valgrind-codequality 1.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for valgrind-codequality 1.3.2
File Size Uploaded
valgrind_codequality-1.3.2.tar.gz 8.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for valgrind-codequality 1.3.2
File Interpreter ABI Platform
valgrind_codequality-1.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 18.5 kB

Release files / valgrind_codequality-1.3.2.tar.gz

Download URL valgrind_codequality-1.3.2.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f08a17cbf7bc168422dd02c4b4ee4934bfa68fa64fec875aecf3083e5eae2760
BLAKE2b-256 checksum
How to use checksums
a63cf577f8b320e4f25f4cac47c10202069edf431510e689350ac2b5cace28c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.10.20 Linux/5.15.154+

Release files / valgrind_codequality-1.3.2-py3-none-any.whl

Download URL valgrind_codequality-1.3.2-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c94fc64c19c1bf91cbf3956b0acdc1f6af585d14babc065758c8b807ccd4b1ef
BLAKE2b-256 checksum
How to use checksums
f9151a7dc6957ffad89a826e1d300fdc44864a314ada605079cd51ad8849515d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.10.20 Linux/5.15.154+

Release history Release notifications | RSS feed

This release

1.3.2 This release

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page