C and C++ tools, packaged¶
cpp-linter builds clang-format, clang-tidy and the LLVM tools around them as static binaries for every LLVM version from 12 to 23, on Linux, macOS and Windows, x86-64 and ARM64. The same files then go to PyPI, npm, Homebrew, asdf and Docker, so you install the tool at the version you pin, with the package manager your project already uses. There is no LLVM to install and nothing to compile.
Python wheels¶
pip install, uv tool install or pipx install puts the command on your PATH. The package
version is the tool's version, so pip install "llvm-cov==22.*" installs llvm-cov from LLVM 22.
-
clang-include-cleaner LLVM 22–23
Finds unused and missing
#includedirectives in C and C++ files.pip install clang-include-cleaner -
clang-apply-replacements LLVM 16–23
Applies the fixes clang-tidy exports to your source files.
pip install clang-apply-replacements -
llvm-cov LLVM 12–23
llvm-covandllvm-profdata, for clang's source-based code coverage.pip install llvm-cov -
ccache-bin ccache 4
ccache, the C and C++ compiler cache, from ccache's own release binaries.pip install ccache-bin
Every wheel:
- holds the tool's binary unchanged, plus clang's builtin headers when the tool parses code;
- contains no Python code, so it works with any Python 3, and is tested with pip, uv,
uv tool installandpip install --useron every platform before it is released; - has Linux wheels for glibc 2.17 and later and for musl, so it also installs on Alpine;
- is published from GitHub Actions with PyPI Trusted Publishing, with an attestation that names the commit it was built from.
Pin the tools next to the rest of your development dependencies, and every laptop and CI job runs the same version:
[dependency-groups]
dev = ["clang-include-cleaner==22.*", "llvm-cov==22.*", "ccache-bin"]
Or run one without installing it, for example in CI: uvx clang-include-cleaner --help, or
pipx run llvm-cov --version on GitHub-hosted runners, which ship with pipx.
clang-format and clang-tidy already have widely used wheels on PyPI from another project, clang-format and clang-tidy; cpp-linter-hooks installs those. For LLVM versions they do not have, or to install several tools at once, use clang-tools, which installs the static binaries by version:
pip install clang-tools
clang-tools install clang-format clang-tidy --version 21
Other package managers¶
| Package | LLVM | Runs on | Install |
|---|---|---|---|
| npm packages | 12 to 23 | Linux, macOS, Windows on x86-64 and ARM64 | npm install --save-dev @cpp-linter/clang-format@21 @cpp-linter/clang-tidy@21 |
| Homebrew tap | 19 to 23 | macOS | brew install cpp-linter/tap/clang-format@21 |
| asdf plugin | 12 to 23 | wherever asdf runs | asdf plugin add clang-format https://github.com/cpp-linter/asdf-clang-tools.git |
| Docker images | 7 to 23 | Docker on x86-64 and ARM64 | docker pull ghcr.io/cpp-linter/clang-tools:21 |
| Static binaries | 12 to 23 | Linux, macOS, Windows on x86-64 and ARM64 | one file from the download page |
One build behind every package¶
A new LLVM release starts a build of the
static binaries on all six
platforms. When it is published, a bot opens the update pull request for each wheel, and the new
wheels are released once they pass their tests on every platform. So an LLVM version runs the same
clang-tidy whether it comes from clang-tools, npm, Homebrew, asdf or Docker. The build and
release workflows the wheels share are in cpp-linter/wheels.
Check what you install¶
Each static binary and each wheel has a build provenance attestation. To check one with the GitHub CLI:
gh attestation verify clang-format-22_linux-amd64 --repo cpp-linter/clang-tools-static-binaries
pip download --no-deps "llvm-cov==22.*"
gh attestation verify llvm_cov-*.whl --repo cpp-linter/llvm-cov-wheel
The static binaries also come with SHA512SUMS. Their
download page shows how to check a
download, and the security policy
explains what an attestation proves.