{"id":25893328,"url":"https://github.com/matyalatte/cpplint-cpp","last_synced_at":"2025-03-02T21:32:53.282Z","repository":{"id":252718170,"uuid":"831181506","full_name":"matyalatte/cpplint-cpp","owner":"matyalatte","description":"C++ reimplementation of cpplint.py","archived":false,"fork":false,"pushed_at":"2024-10-19T21:46:11.000Z","size":442,"stargazers_count":31,"open_issues_count":4,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-01T02:57:58.171Z","etag":null,"topics":["cpp","lint","linter"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matyalatte.png","metadata":{"files":{"readme":"docs/README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["matyalatte"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"custom":null}},"created_at":"2024-07-19T21:26:40.000Z","updated_at":"2025-02-28T14:47:36.000Z","dependencies_parsed_at":"2024-09-14T02:17:36.268Z","dependency_job_id":"5b0bfbc8-3e58-4e5a-a7e3-9c1a71cf02c2","html_url":"https://github.com/matyalatte/cpplint-cpp","commit_stats":null,"previous_names":["matyalatte/cpplint-cpp"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matyalatte%2Fcpplint-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matyalatte%2Fcpplint-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matyalatte%2Fcpplint-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matyalatte%2Fcpplint-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matyalatte","download_url":"https://codeload.github.com/matyalatte/cpplint-cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241576070,"owners_count":19984928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","lint","linter"],"created_at":"2025-03-02T21:32:52.628Z","updated_at":"2025-03-02T21:32:53.241Z","avatar_url":"https://github.com/matyalatte.png","language":"C++","readme":"# cpplint-cpp\n\n[![License](https://img.shields.io/badge/License-BSD_3--Clause-green.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\nC++ reimplementation of [cpplint 2.0](https://github.com/cpplint/cpplint/tree/2.0.0)\n\n## What is cpplint?\n\n[Cpplint](https://github.com/cpplint/cpplint) is a command-line tool to check C/C++ files for style issues according to [Google's C++ style guide](http://google.github.io/styleguide/cppguide.html).\nIt used to be developed and maintained by Google Inc. One of its forks now maintains the project.\n\n## Installation\n\nYou can install the `cpplint-cpp` command via pip.\n\n```sh\npip install cpplint-cpp --no-index --find-links https://matyalatte.github.io/cpplint-cpp/packages.html\n```\n\n## cpplint-cpp vs. cpplint.py\n\nHere is an analysis of the performance differences between `cpplint-cpp` and `cpplint.py` against two repositories:\n[`googletest`](https://github.com/google/googletest) and `cpplint-cpp`.\nMeasurements were taken on an Ubuntu runner with [some scripts](BENCHMARK.md).\n\n### Execution time\n\nYou can see `cpplint-cpp` has significantly better performance, being over 30 times faster than `cpplint.py`.\n\n|             | googletest-1.14.0 (s) | cpplint-cpp (s) |\n| ----------- | --------------------- | --------------- |\n| cpplint-cpp | 0.439020              | 0.092547        |\n| cpplint.py  | 21.639285             | 3.782867        |\n\n### Memory usage\n\nDespite using multithreading with 4 cores, `cpplint-cpp` has lower memory usage than `cpplint.py`.\n\n|             | googletest-1.14.0 | cpplint-cpp |\n| ----------- | ----------------- | ----------- |\n| cpplint-cpp | 15.46 MiB         | 10.45 MiB   |\n| cpplint.py  | 23.08 MiB         | 22.57 MiB   |\n\n## Changes from cpplint.py\n\nBasically, `cpplint-cpp` uses the same algorithm as `cpplint.py`, but some changes have been made to reduce processing time.\n\n- Added concurrent file processing.\n- Removed some redundant function calls.\n- Used JIT compiler for some regex patterns.\n- Combined some regex patterns.\n- Added `--timing` option to display the execution time.\n- Added `--threads=` option to specify the number of threads.\n- And other minor changes for optimization...\n\n## Unimplemented features\n\ncpplint-cpp is a WIP project. Please note that the following features are not implemented yet.\n\n- JUnit style outputs.\n- Multibyte characters in stdin on Windows.\n\n## Building\n\n### Requirements\n\n- [Meson](https://github.com/mesonbuild/meson)\n- C++20 compiler\n\n### Debug build\n\nYou can build `cpplint-cpp` with the following commands.\n\n```sh\nmeson setup build\nmeson compile -C build\nmeson test -C build\n./build/cpplint-cpp --version\n```\n\n### Release build\n\nYou can use [`presets/release.ini`](../presets/release.ini) to enable options for release build.\n\n```sh\nmeson setup build --native-file=presets/release.ini\nmeson compile -C build\n```\n\n### Build wheel package\n\nYou can make a pip package with the following commands.\n\n```sh\nmkdir dist\ncp ./build/cpplint-cpp ./dist\ncp ./build/version.h ./dist\npip install build\npython -m build\n```\n\n## Submitting Feature Requests\n\nI do not accept feature requests related to cpplint specifications, including the addition of new rules.\nFor such requests, please visit [the original cpplint project](https://github.com/cpplint/cpplint/issues) to submit your suggestions.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## Credits\n\nThis software uses (or is inspired by) several open-source projects. I gratefully acknowledge the work of the following contributors:\n\n- **[Google Style Guides](https://github.com/google/styleguide)** by Google Inc.\n  - Contribution: Original implementation of `cpplint.py`.\n  - License: [Apache License 2.0](https://github.com/google/styleguide/blob/gh-pages/LICENSE)\n\n- **[cpplint/cpplint](https://github.com/cpplint/cpplint)**\n  - Contribution: Latest updates of `cpplint.py`.\n  - License: [BSD 3-Clause License](https://github.com/cpplint/cpplint/blob/master/LICENSE)\n\n- **[pcre2](https://github.com/PCRE2Project/pcre2)**\n  - Contribution: Regex matching.\n  - License: [PCRE2 LICENCE](https://github.com/PCRE2Project/pcre2/blob/master/LICENCE)\n\n- **[ThreadPool](https://github.com/progschj/ThreadPool)** by progschj\n  - Contribution: Thread pool implementation\n  - License: [zlib License](https://github.com/progschj/ThreadPool/blob/master/COPYING)\n\n- **[widechar_width.h](https://github.com/ridiculousfish/widecharwidth/blob/master/widechar_width.h)** by ridiculousfish\n  - Contribution: Reference tables for character widths.\n  - License: [CC0 Public Domain](https://github.com/ridiculousfish/widecharwidth/blob/master/LICENSE)\n","funding_links":["https://github.com/sponsors/matyalatte"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatyalatte%2Fcpplint-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatyalatte%2Fcpplint-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatyalatte%2Fcpplint-cpp/lists"}