| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
C++ reimplementation of cpplint 2.0
Cpplint is a command-line tool to check C/C++ files for style issues according to Google's C++ style guide. It used to be developed and maintained by Google Inc. One of its forks now maintains the project.
You can install the cpplint-cpp command via pip.
pip install cpplint-cpp --no-index --find-links https://matyalatte.github.io/cpplint-cpp/packages.htmlHere is an analysis of the performance differences between cpplint-cpp and cpplint.py against two repositories: googletest and cpplint-cpp. Measurements were taken on an Ubuntu runner with some scripts.
You can see cpplint-cpp has significantly better performance, being over 30 times faster than cpplint.py.
| googletest-1.14.0 (s) | cpplint-cpp (s) | |
|---|---|---|
| cpplint-cpp | 0.439020 | 0.092547 |
| cpplint.py | 21.639285 | 3.782867 |
Despite using multithreading with 4 cores, cpplint-cpp has lower memory usage than cpplint.py.
| googletest-1.14.0 | cpplint-cpp | |
|---|---|---|
| cpplint-cpp | 15.46 MiB | 10.45 MiB |
| cpplint.py | 23.08 MiB | 22.57 MiB |
Basically, cpplint-cpp uses the same algorithm as cpplint.py, but some changes have been made to reduce processing time.
cpplint-cpp is a WIP project. Please note that the following features are not implemented yet.
You can build cpplint-cpp with the following commands.
meson setup build
meson compile -C build
meson test -C build
./build/cpplint-cpp --versionYou can use presets/release.ini to enable options for release build.
meson setup build --native-file=presets/release.ini
meson compile -C buildYou can make a pip package with the following commands.
mkdir dist
cp ./build/cpplint-cpp ./dist
cp ./build/version.h ./dist
pip install build
python -m buildI do not accept feature requests related to cpplint specifications, including the addition of new rules. For such requests, please visit the original cpplint project to submit your suggestions.
See CONTRIBUTING.md
This software uses (or is inspired by) several open-source projects. I gratefully acknowledge the work of the following contributors:
Google Style Guides by Google Inc.
ThreadPool by progschj
widechar_width.h by ridiculousfish
| Back | FazBrowse Home | New Git URL |