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.0 - 2025/02/12
- Added
--fixto enable relative paths in output - 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.0.tar.gz
(14.8 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.0.tar.gz.
File metadata
- Download URL: clang_tidier-0.7.0.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b52a76554abed3e0798311abeff9cee203072ec4043ddf937638dd168febeda7
|
|
| MD5 |
7757ea0e24174db8245951bc1ba7a064
|
|
| BLAKE2b-256 |
1f9e5d2492953ec089775603b82382d7b03dd4be4f4da258e90f776c616db84b
|
File details
Details for the file clang_tidier-0.7.0-py3-none-any.whl.
File metadata
- Download URL: clang_tidier-0.7.0-py3-none-any.whl
- Upload date:
- Size: 14.8 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 |
b8c5da0ba28d1eb21521d88edcf089ebc7dd4e2a2023556ead7702148f473a81
|
|
| MD5 |
9e05e5d627c42504622d820a5271886d
|
|
| BLAKE2b-256 |
1ae8e7f95847e7b89501ed23a285b49782fda000b5c82f92c13c6c108dca08f7
|