clang-tidy
Clang-tidy is an LLVM-based code analyser tool
What it is and what it does
clang-tidy is a Python distribution that bundles the LLVM clang-tidy static analyzer and companion tools. It lets you install a ready-to-use C++ linter directly from PyPI without building LLVM or managing system dependencies. The package includes clang-tidy itself for linting C++ code, clang-apply-replacements for applying automated fixes, run-clang-tidy.py for batch analysis across a compilation database or directory tree with parallelism, and clang-tidy-diff.py for analyzing only changed lines in a diff.
The distribution provides pre-built binaries for macOS (Intel and ARM), Linux (multiple architectures including aarch64, x86_64, i686, armv7l), Windows, and musl-based systems. It has no Python runtime dependencies, making installation straightforward. The package is actively maintained with regular releases aligned to LLVM versions, and can be used directly via pipx for one-off runs without installation.
Use it for:
- Integrate C++ static analysis into CI/CD pipelines without requiring system clang-tidy installation or LLVM build steps.
- Run clang-tidy on a codebase across all files in a compilation database with automatic parallelism using run-clang-tidy.py.
- Apply automated code fixes exported by clang-tidy using clang-apply-replacements to enforce coding standards.
- Analyze only changed lines in pull requests or commits using clang-tidy-diff.py for focused code review.
- Use pipx to run clang-tidy on demand without pre-installing it on developer machines or CI runners.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Packages the clang-tidy C++ linter and related LLVM tools as a PyPI-installable Python distribution, making static analysis available without separate system installation.
Yes. This package solves a real friction point—getting clang-tidy into CI and local workflows without system dependencies. It's actively maintained, has no vulnerabilities, uses a permissive license, and covers all major platforms with pre-built binaries. Install it if you need C++ static analysis in a Python-managed environment.
Install
clang-tidy on PyPI
pip
pip install clang-tidyuv
uv add clang-tidypoetry
poetry add clang-tidyInstalling clang-tidy
Before you install
Medium install friction due to platform-specific binary wheels (11 variants covering macOS, Linux, Windows, and ARM architectures). Active maintenance with a release 31 days ago and no known vulnerabilities.
License in practice
Licensed under Apache 2.0 (permissive), allowing commercial and private use with minimal restrictions. The underlying clang-tidy is provided by LLVM under Apache 2.0 with LLVM exceptions.
Quickstart
pip install clang-tidy
clang-tidy --version
clang-tidy path/to/file.cpp
Requires a C++ source file or compilation database to analyze; clang-tidy itself is bundled but you need C++ code to lint.
Verify before relying
- Whether the bundled clang-tidy version matches the package version (22.1.8) or if it tracks a different LLVM release cycle
- Python version compatibility (requires_python is unspecified in metadata)
Package facts
| License | Apache 2.0 (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 31 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 422,879/month — #6,776 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: clang_tidy-22.1.8-py2.py3-none-macosx_10_9_x86_64.whl; clang_tidy-22.1.8-py2.py3-none-macosx_11_0_arm64.whl; clang_tidy-22.1.8-py2.py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; clang_tidy-22.1.8-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; clang_tidy-22.1.8-py2.py3-none-manylinux_2_28_i686.whl; clang_tidy-22.1.8-py2.py3-none-manylinux_2_31_armv7l.whl; clang_tidy-22.1.8-py2.py3-none-musllinux_1_2_armv7l.whl; clang_tidy-22.1.8-py2.py3-none-musllinux_1_2_i686.whl; clang_tidy-22.1.8-py2.py3-none-musllinux_1_2_x86_64.whl; clang_tidy-22.1.8-py2.py3-none-win32.whl; clang_tidy-22.1.8-py2.py3-none-win_amd64.whl
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
clang-formatPackages the clang-format code formatter as a…
permissive · top 5,000 on PyPI
clangd-tidyclangd-tidy wraps clangd to provide faster…
permissive · top 15,000 on PyPI
cppyy-clingProvides Cling, an LLVM-based interactive C++…
copyleft · top 15,000 on PyPI
pyclangPyclang wraps clang-tidy to run static analysis…
permissive · top 15,000 on PyPI
clangProvides Python bindings to libclang, allowing…
permissive · top 5,000 on PyPI
cmakeDistributes CMake 4.4.2 as a Python package,…
permissive · top 5,000 on PyPI
llvm-testing-toolsProvides LLVM testing utilities like FileCheck…
unclear · top 15,000 on PyPI
pyclnPycln finds and removes unused import…
permissive · top 15,000 on PyPI
litlit is a portable test runner for executing…
permissive · top 5,000 on PyPI
swigProvides SWIG as a PyPI-installable package,…
copyleft · top 5,000 on PyPI