Cpplint is a command-line tool to check C/C++ files for style issues according to Google’s C++ style guide.
Cpplint used to be developed and maintained by Google Inc. at google/styleguide. Nowadays, Google is no longer maintaining the public version of cpplint, and pretty much everything in their repo’s PRs and issues about cpplint have gone unimplemented.
This fork aims to update cpplint to modern specifications, and be (somewhat) more open to adding fixes and features to make cpplint usable in wider contexts.
Installation
Use [pipx](https://pipx.pypa.io) to install cpplint from PyPI, run:
$ pipx install cpplint
Usage
$ cpplint [OPTIONS] files
For full usage instructions, run:
$ cpplint --help
cpplint can also be run as a pre-commit hook by adding to .pre-commit-config.yaml:
- repo: https://github.com/cpplint/cpplint
rev: 2.0.0
hooks:
- id: cpplint
args:
- --filter=-whitespace/line_length,-whitespace/parens
Changes
python 3 compatibility
more default file extensions
customizable file extensions with the –extensions argument
continuous integration on github
support for recursive file discovery via the –recursive argument
support for excluding files via –exclude
JUnit XML output format
Overriding repository root auto-detection via –repository
Support #pragma once as an alternative to header include guards
… and quite a bit more
Acknowledgements
Thanks to Google Inc. for open-sourcing their in-house tool.
Thanks to our contributors.
Maintainers
Former
Metadata
Release files for cpplint 2.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cpplint-2.0.2.tar.gz | 373.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cpplint-2.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 455.8 kB
Release files / cpplint-2.0.2.tar.gz
| Download URL | cpplint-2.0.2.tar.gz |
|---|---|
| Size | 373.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a5971e4b5490133e425284f0c566c7ade0b959e61018d2c9af3ff7f357ddc57
|
|
BLAKE2b-256 checksum How to use checksums |
c58347a9e7513ba4d943a9dac2f6752b444377c91880f4f4968799b4f42d89cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 Apr 8, 2025.
Transparency logRelease files / cpplint-2.0.2-py3-none-any.whl
| Download URL | cpplint-2.0.2-py3-none-any.whl |
|---|---|
| Size | 82.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ec188b5a08e604294ae7e7f88ec3ece2699de857f0533b305620c8cf237cad5
|
|
BLAKE2b-256 checksum How to use checksums |
666508d3a5039b565231c501b31d1a973d4222e9803c03b2c31a9c08bdec3e30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 Apr 8, 2025.
Transparency log