Skip to content

Getting Started

Welcome to cpp-linter! This guide will help you integrate C/C++ linting into your workflow quickly and efficiently.

What is cpp-linter?

cpp-linter connects the standard LLVM linting tools, clang-format and clang-tidy, to the places where C/C++ projects need checks: pull requests, pre-commit hooks, local scripts, and CI jobs.

  • clang-format checks formatting against a named style or your .clang-format file.
  • clang-tidy runs static-analysis and modernization checks, usually configured by .clang-tidy.
  • cpp-linter wraps those tools into integrations with consistent defaults, reporting, and failure controls.

Choose Your Integration

Select the method that best fits your development workflow:

Use case Recommended entry point
GitHub pull request checks cpp-linter-action
Local checks before commits cpp-linter-hooks
Custom scripts or CI jobs cpp-linter CLI (Python)
High-performance local runs cpp-linter-rs (Rust)
  • GitHub Actions


    GitHub Action for automated C/C++ linting in your workflows

    Perfect for: CI/CD pipelines, automated PRs, team collaboration

    Get started with GitHub Actions →

  • Pre-commit Hooks


    Pre-commit hooks for automated C/C++ linting in your local development

    Perfect for: Catching issues before commits, local enforcement

    Get started with pre-commit →

  • Command Line (Python)


    Core Python package for cpp-linter-action behind the scenes

    Perfect for: Local development, custom scripts, one-off analysis

    Get started with cpp-linter package →

  • Command Line (Rust)


    High-performance Rust implementation of cpp-linter

    Perfect for: Local development, custom scripts, one-off analysis

    Get started with cpp-linter-rs →

Clang Tools — Simplified

We provide ready-to-use binaries, Docker images, and Python wheels of key clang tools:

  • clang-tools-static-binaries


    Statically-linked clang-format, clang-tidy, clang-query, clang-apply-replacements, and clang-include-cleaner binaries for Linux, macOS, and Windows

    Download from →

  • clang-tools-docker


    Docker images with pre-installed clang-format and clang-tidy

    Download from →

  • clang-tools-wheels


    Redistribute clang-format and clang-tidy Python wheels

    Download from →

  • clang-apply-replacements


    Install clang-apply-replacements via pip — standalone Python wheel

    Install from PyPI →

  • clang-include-cleaner


    Install clang-include-cleaner via pip — detects unused #include directives

    Install from PyPI →

Easy Installation

  • clang-tools-pip


    Install clang-format, clang-tidy, clang-query, clang-apply-replacements, and clang-include-cleaner via static binaries or Python wheels using a single CLI

    Get started with clang-tools CLI →

  • clang-tools-asdf


    Easy installation of clang tools static binaries via asdf

    Get started with asdf →

  • Homebrew Tap


    Install clang-format, clang-tidy, clang-query, clang-apply-replacements, and clang-include-cleaner via Homebrew — no compilation required

    Get started with Homebrew →