cpp-linter
The Python command behind cpp-linter-action: it runs clang-format and clang-tidy on C and C++ files, locally or in other CI.
Website · Documentation · Get started · Discussions
Quick start
With the clang tools installed (see Limitations):
pip install cpp-linter
cpp-linter --version=21 --style=file --tidy-checks=''
Usage
For usage in a GitHub Actions workflow, see the cpp-linter/cpp-linter-action repository
For the description of supported Command Line Interface options, see the CLI documentation
Applying fixes
Passing the --fix option makes cpp-linter apply clang-format fixes in-place to any files that have formatting problems.
Limitations
cpp-linter does not install the clang tools. Install them first, for example with clang-tools; without them, --version=21 falls back to whatever clang-format and clang-tidy are on your PATH.
It exits 0 even when checks fail, so it reports findings but does not fail a build.
Locally, --files-changed-only and --lines-changed-only read the local git diff. In other CI, check the whole repository (the default): most CI systems set CI=true, and with it those options ask the GitHub API for the changed files.
Sponsors
cpp-linter is maintained by two volunteers. Sponsor the project through Open Collective. Silver and Gold sponsors get their logo here.
Contributing
To provide feedback (requesting a feature or reporting a bug) please post to issues. To contribute changes, see CONTRIBUTING.rst.
License
The scripts and documentation in this project are released under the MIT License.
Metadata
Release files for cpp-linter 1.15.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 | |
|---|---|---|---|
| cpp_linter-1.15.0.tar.gz | 2.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cpp_linter-1.15.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.6 MB
Release files / cpp_linter-1.15.0.tar.gz
| Download URL | cpp_linter-1.15.0.tar.gz |
|---|---|
| Size | 2.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ab8ce34cf6ceb8c3b4925b42d0fd51545520bfb2a3c901cfb0fb50a7bbfa484
|
|
BLAKE2b-256 checksum How to use checksums |
a5e6c55e1348912caeecbcfbef4778de0647b177aafb8267c81610b6f31cbf96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logRelease files / cpp_linter-1.15.0-py3-none-any.whl
| Download URL | cpp_linter-1.15.0-py3-none-any.whl |
|---|---|
| Size | 35.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
17921ea5af0cc98a7544b36860906b702623c8065058650bba0289d5e59f0575
|
|
BLAKE2b-256 checksum How to use checksums |
a5076d271154e7f4bf074c3e930191027cd33e695d69e35799bcec08bf2063ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency log