clangd-tidy
A faster alternative to clang-tidy
What it is and what it does
clangd-tidy is a Python wrapper around clangd that performs static analysis on C++ code faster than the standalone clang-tidy tool. It acts as a drop-in replacement, accepting similar command-line arguments and integrating with existing build systems and CI pipelines. The speed improvement comes from clangd's architecture: it builds abstract syntax trees only from the files being checked, rather than processing all included headers as clang-tidy does.
The package depends on attrs, cattrs, and typing-extensions for its Python runtime, and requires clangd to be installed separately on the system. It supports features like code formatting checks via clang-format integration, `.clangd` configuration files for advanced diagnostics (such as include checks), line-based filtering of results, and output formatting for GitHub Actions. Some clang-tidy features like the `--fix` option are not supported, and a small number of checks are silently disabled because clangd does not implement them.
Use it for:
- Speed up C++ static analysis in CI/CD pipelines where clang-tidy execution time is a bottleneck.
- Check header files individually without requiring them to be in the compilation database.
- Combine static analysis and code formatting checks in a single tool to reduce separate tool invocations.
- Leverage clangd's `.clangd` configuration for advanced diagnostics like unused-include and missing-include checks.
- Integrate with GitHub Actions workflows to report diagnostics with hyperlinked check names in supported terminals.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
clangd-tidy wraps clangd to provide faster static analysis of C++ code as a drop-in replacement for clang-tidy, leveraging clangd's speed while maintaining compatibility with existing build systems and CI scripts.
Yes, with conditions. Install if you have a C++ codebase where clang-tidy runtime is a CI bottleneck and you can accept that some clang-tidy features (like `--fix`) and a small set of checks are unavailable. Requires clangd to be pre-installed on your system. No security vulnerabilities are known, maintenance is active, and the permissive license poses no restrictions.
Install
clangd-tidy on PyPI
pip
pip install clangd-tidyuv
uv add clangd-tidypoetry
poetry add clangd-tidyInstalling clangd-tidy
Before you install
Low install friction: pure Python wheel with only three lightweight runtime dependencies (attrs, cattrs, typing-extensions). Actively maintained with recent releases; however, requires clangd to be installed separately on the system.
License in practice
Licensed under permissive terms (MIT), placing no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install clangd-tidy
clangd-tidy -p build file.cpp
# or with formatting check:
clangd-tidy -f -p build file.cpp
clangd must be installed and available on the system PATH; Python 3.8 or later required.
Verify before relying
- Whether clangd-tidy's 'over 10x' speed claim is reproducible on typical codebases and hardware.
- Scope and impact of the several checks that clangd silently disables compared to standalone clang-tidy.
- Practical differences in diagnostic output aesthetics and whether they affect CI/CD workflows.
- Whether the optional tqdm dependency is automatically installed or must be added manually for progress bars.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — attrs, cattrs, typing-extensions |
| Maintenance | actively maintained — 186 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 158,518/month — #10,721 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: clangd_tidy-1.1.1-py3-none-any.whl
Keywords: clang-tidy, clangd, static-analysis, cpp
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-tidyPackages the clang-tidy C++ linter and related…
permissive · 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
litlit is a portable test runner for executing…
permissive · top 5,000 on PyPI
scan-buildRuns the Clang static analyzer on C/C++…
permissive · top 15,000 on PyPI
clang-formatPackages the clang-format code formatter as a…
permissive · top 5,000 on PyPI
cppyy-clingProvides Cling, an LLVM-based interactive C++…
copyleft · top 15,000 on PyPI
grep-astSearch source code files by pattern and display…
permissive · top 5,000 on PyPI
pylint-exitTranslates pylint's bit-encoded exit codes into…
permissive · top 15,000 on PyPI