skillfed

clang-tidy

Clang-tidy is an LLVM-based code analyser tool

clang-tidy v22.1.8 422.9K downloads/30d#6,776 on PyPI39,796
Permissive license Apache 2.0 Active released

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-tidy

uv

uv add clang-tidy

poetry

poetry add clang-tidy

Installing 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

Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: CProgramming Language :: C++Topic :: Software Development :: Quality Assurance

Tags

C++ static analysis linterclang-tidy Python packageLLVM code quality checkerC++ code linting toolautomated C++ code review
c-plus-plusstatic-analysislinting

More Quality Assurance packages