Metadata-Version: 2.2
Name: clang-tidier
Version: 0.7.1
Summary: A simple runner for clang-tidy.
Author-email: Mark Gillard <mark.gillard@outlook.com.au>
License: MIT
Project-URL: Source, https://github.com/marzer/clang-tidier
Project-URL: Tracker, https://github.com/marzer/clang-tidier/issues
Project-URL: Funding, https://github.com/sponsors/marzer
Keywords: c++,clang-tidy
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: C
Classifier: Programming Language :: C++
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Software Development :: Compilers
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Bug Tracking
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: misk>=0.8.1
Requires-Dist: colorama

# 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-trace` causing failures in some cases

## v0.6.0 - 2025/02/10

- Added `--relative-paths` to 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/y` to 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-tidy` is 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 🎉&#xFE0F;
