MCDC Checker
This repository contains a tool to check all conditions in your C/C++ source code if they are in the necessary form, so that Gcov can generate modified condition decision coverage. This tool requires LLVM/Clang 19 or newer to be installed.
Quick start
Install the tool with pipx, which keeps it in its own virtual environment, after installing Clang 19 or newer:
pipx install mcdc-checker
mcdc-checker source.c
mcdc-checker -a -j report.json
python -m pip install mcdc-checker installs it into the active environment
instead, which is what a packager wants. mcdc-checker -a checks every source
below the directory, -j report.json writes a machine-readable report, and
mcdc-checker --version reports the version. python -m mcdc_checker runs the
same command from a checkout of the source tree. On Arch Linux, the mcdc-checker AUR
package installs the tool with
an AUR helper.
Documentation
The full documentation covers installation, usage, the interpretation of the results, and the theory of operation of the analysis:
Build it locally with:
poetry install
poetry run sphinx-build -W -b html doc doc_html
The generated entry page is doc_html/index.html. The automodule pages import
the analysis modules, so the build needs the PBL and PBDD submodules checked
out.
Development
CONTRIBUTING.md describes the development environment, including why the submodules are needed for every command. The short version:
git submodule update --init --recursive
poetry install
poetry run pytest
PYTHONPATH=PBL/include:PBDD/include poetry run mypy mcdc_checker
poetry run pre-commit run --all-files
The pipeline runs the suite on Debian trixie and on Arch Linux, which pin the interpreters 3.13 and the rolling 3.14 and carry the Clang 19 and 23 that the tool needs.
License
The MCDC Checker source code implemented by Celeres is subject to the Mozilla Public License 2.0 as indicated by the headers of the corresponding source code files. Third party libraries used herein are subject to their own licence terms, which is the BSD license for Clang itself and patches to its source code as well as the PBL and PBDD libraries.
Links
Metadata
Release files for mcdc-checker 1.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcdc_checker-1.6.0.tar.gz | 1.5 MB | Without provenance | Details for mcdc_checker-1.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcdc_checker-1.6.0-py3-none-any.whl | Python 3 | none | any | Details for mcdc_checker-1.6.0-py3-none-any.whl |
Total release size: 1.5 MB
Release files / mcdc_checker-1.6.0.tar.gz
| Download URL | mcdc_checker-1.6.0.tar.gz |
|---|---|
| Size | 1.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e182fef2c7dd3216623faf59832e08adc1c31012bfee2dca427ed57cd52ed01
|
|
BLAKE2b-256 checksum How to use checksums |
2c9cc5d8e2e2797f7a8e15b361001622fdd4019714565069d75298e25f29db76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.14.9 Linux/7.0.2-2-pve
|
Release files / mcdc_checker-1.6.0-py3-none-any.whl
| Download URL | mcdc_checker-1.6.0-py3-none-any.whl |
|---|---|
| Size | 43.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fffedc72f73741da2fdfd205d405c7ab16becbf334590b80d45fa58ad1af361
|
|
BLAKE2b-256 checksum How to use checksums |
d1284c7bf70e6ffd0c42aa44f6c41de4d58b7c3fa20f0694c6befed1d37cbc86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.14.9 Linux/7.0.2-2-pve
|
Security for mcdc-checker 1.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.