A simple runner for clang-tidy.
Project description
clang-tidier
A simple clang-tidy runner for C and C++ projects.
Installation
clang-tidier requires Python 3.8 or higher, as well as some version of clang-tidy visible on the system PATH.
pip3 install clang-tidier
Usage
clang-tidier is a command-line application
usage: clang-tidier [-h] [--version] [--include <regex> [<regex> ...]] [--exclude <regex> [<regex> ...]]
[--werror] [--threads <num>] [--session | --no-session] [compile_db]
clang-tidy runner for C and C++ projects.
positional arguments:
compile_db path to compile_commands.json, or a directory containing it (default: discover automatically)
options:
-h, --help show this help message and exit
--version print the version and exit
--include <regex> [<regex> ...]
regular expression to select source files.
--exclude <regex> [<regex> ...]
regular expression to exclude source files.
--werror stop on the first file that emits warnings
--threads <num> number of threads to use.
--session, --no-session
saves run information so subsequent re-runs may avoid re-scanning files. (default: True)
v0.3.0 - github.com/marzer/clang-tidier
Exit codes
| Value | Meaning |
|---|---|
| 0 | No issues were found |
N, where N is a positive integer |
N issues were found |
| -1 | A fatal error occurred |
Changelog
v0.7.1 - 2025/02/26
- Fixed some additional compiler flag-related breakages
v0.7.0 - 2025/02/12
- Added
--fix - Fixed clang's
-ftime-tracecausing failures in some cases
v0.6.0 - 2025/02/10
- Added
--relative-pathsto enable relative paths in output - Fixed paths in output always being relative by default
v0.5.2 - 2025/01/30
- Fixed compiler argument slicing regression introduced in v0.5.1
v0.5.1 - 2025/01/29
- Fixed sanitizer and GCC flags breaking clang-tidy in some common cases
v0.5.0 - 2025/01/27
- Added
--batch x/yto enable distributed parallelism - Minor internal fixes
v0.4.1 - 2024/11/19
- Fixed precompiled headers breaking runs in some circumstances
- Improved wording of session restart message
v0.4.0 - 2024/09/07
- Fixed sessions not restarting if
.clang-tidyis modified - Added
--labels-only - Minor performance improvements
v0.3.0 - 2024/08/04
- Added
--no-session - Added use of sessions by default
v0.2.0 - 2024/08/03
- Added
--session
v0.1.2 - 2024/06/06
- Fixed build-generated translation causing 'did not exist or was not a file' errors
- Improved performance of TU enumeration step
v0.1.1 - 2024/05/16
- Fixed issues with older clang-tidy versions trying to use
--use-color
v0.1.0 - 2024/05/09
- First public release 🎉️
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
clang_tidier-0.7.1.tar.gz
(15.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clang_tidier-0.7.1.tar.gz.
File metadata
- Download URL: clang_tidier-0.7.1.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddd2212c6d9a33ef5dd6d6e03ed15bfbbc8fb03f477f5439b582c9fa3ecfe322
|
|
| MD5 |
b7426ce8305b922f3ceb75e342dad56b
|
|
| BLAKE2b-256 |
ed84798131297f5582bd0ab417db8d10ea55c5027ddce22160013effd2e6fbd3
|
File details
Details for the file clang_tidier-0.7.1-py3-none-any.whl.
File metadata
- Download URL: clang_tidier-0.7.1-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
106726a9df7ca87499912643b6331dfda35b413e4f3260a55122312a5e5a58d8
|
|
| MD5 |
681f290bf5a980bfd74e9261f22c0744
|
|
| BLAKE2b-256 |
3a538b017d7cb2d4f338a16b85119eba44c55303674b91dc3c0e398b40eea4c7
|