Skip to main content

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.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 🎉️

Project details


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.5.2.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clang_tidier-0.5.2-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file clang_tidier-0.5.2.tar.gz.

File metadata

  • Download URL: clang_tidier-0.5.2.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for clang_tidier-0.5.2.tar.gz
Algorithm Hash digest
SHA256 24b18c1fadd08775b0145d3d61a7242ea0bdd93fdb7e4eea8f995e98cb43c965
MD5 9c87696753c6d32079685648bc7f17dc
BLAKE2b-256 41f1337c54707cb33f4a2adc6abfec106dd6757e4f180e6ad3fe348e93750982

See more details on using hashes here.

File details

Details for the file clang_tidier-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: clang_tidier-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for clang_tidier-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5dee0eead306fde8758c4feb377804c33c943cc96a2ff4385a3002c01079bc7e
MD5 8807060a5ac8c9b534acff35c731612f
BLAKE2b-256 02d9d93894098135f1edf18cfeb951bbbac29e3e44dcde5783694cbbaa06ec8b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page