This project continues the work of cpplint, a C++ style checker
following Google's C++ style guide. It provides cpplint as a PyPI
package and adds a few features and fixes. It is maintained as a
fork of google/styleguide (https://github.com/google/styleguide)
in hopes that it can be merged in the future.
Provides
Requires
License
BSD-3-Clause
Changelog
* Fri Oct 31 2025 Steve Kowalik <steven.kowalik@suse.com>
- Update to 2.0.2:
* Drop Python 3.8
* Don't err on non-const references by default
* fix(indentation_namespace): false positive for MemInitLists
* Fix missing comma between items in _CPP_HEADERS
* Fix false positive for indented parameters in namespaces
* IWYU: treat stdio.h the same way as cstdio
* PEP 621: Migrate from setup.{py, cfg} to pyproject.toml
* cpplint_clitest.py: Function names should be lowercase
* suppress C++-only categories on C file extensions
* You can now specify blocks of code that exclude linting with NOLINTBEGIN
and NOLINTEND
* The --filter option can now be only applied to a specific file or even a
specific line through utilizing colons
* NOLINT and NOLINTNEXTLINE comments now support a comma-separated list of
categories
* NOLINT and NOLINTNEXTLINE will now ignore categories known to be from
clang-tidy
* build/include-what-you-use no longer supports transitive headers from the
header for the current module for parity with the style guide
* build/include-what-you-use now supports a plethora of new functions
* build/include-what-you-use will no longer err on similarly-named classes
from other namespaces
* Indented functions inside namespaces will now be correctly erred on
* The check for C-style casts now looks for the standard fixed-width
integer typenames instead of non-standard ones (e.g. int32_t instead of
int32)
* readability/braces will realize that C++20 concepts require a semicolon
* C++20 headers will no longer be flagged as C headers
* Processing C++ files through stdin/piping is now fixed
* You can now specify the name of the CPPLINT.cfg file through --config as
long as it is in the same directory
* The new __VA_OPT__(,) will now be recognized by the Whitespace linter as
a function
* The check for including a source file's header file will now scan all
files with the same base name
* build/class and build/namespaces no longer check for whether a namespace
or class has a closing brace
* For header files, the check for a header guard's name will now be cached
and only run once, as opposed to previously being run on every line
* Usages of the deprecated sre_compile were refectored
* Usages of deprecated unittest aliases were refactored
* Typos in this changelog, comments and functions were fixed
* %-strings were modernized into f-strings
- Drop patches, all upstream:
* deprecated-unittest-aliases.patch
* drop-sre-compile.patch
* python312.patch
- Add patch do-not-use-codecs-open.patch:
* Do not use deprecated codecs.open() method.
* Mon Jul 07 2025 Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
* Mon Jun 16 2025 Steve Kowalik <steven.kowalik@suse.com>
- Switch to pyroject macros.
* Tue Feb 20 2024 Daniel Garcia <daniel.garcia@suse.com>
- Add upstream patches to support python 3.12
- deprecated-unittest-aliases.patch, gh#cpplint/cpplint#182
- python312.patch, gh#cpplint/cpplint#243
* Mon Apr 10 2023 Daniel Garcia <daniel.garcia@suse.com>
- Add drop-sre-compile.patch upstream patch to fix issues with
deprecated usage of sre_compile gh#cpplint/cpplint#214
- Update to 1.6.1
* Fix #195 Fix post increment/decrement operator causing a false positive.
* Fix #202 .hh files should not be considered sytem headers
* Fix #207 Python2 incompatibility for loading CPPLINT.cfg file
* Fix #184 NOLINT(clang-analyzer) comments should not cause warnings
- 1.6.0 (2022-02-19)
* Fix #188: "Include the directory when naming header files" also
for header files with other names like "*.hpp"
- 1.5.5 (2021-05-20)
* Fix #172: Added 'size_t' to typecasts detected by CheckCStyleCast
* Fixed wrong CLI help text: Each filter needs + or -
* Fix #164: add elif as an exception for CheckSpacingForFunctionCall()
* Fix google#346: --root option not working on windows due to
slashes in path
* Mon Aug 31 2020 Steve Kowalik <steven.kowalik@suse.com>
- Update to 1.5.4:
* Fix google#166, Allow space before C++11 attributes
* Fix #156: sed/gsed output parameter rejected
* Fix #156: sed/gsed output without other stdout information
* improvements to regres