C/C++ Linting
Everything you need for linting C/C++ code
-
Built in Open Source
Open-source and MIT-licensed. Bringing contributors together to empower impactful C/C++ lint projects in open source and beyond.
-
Zero Configuration
Works out of the box with sensible defaults. Advanced users can customize every aspect to match their coding standards.
-
Works Everywhere
GitHub Actions, Pre-commit, Command Line, Docker containers and more – integrate anywhere your code lives.
Trusted by developers worldwide
Join thousands of developers and organizations using cpp-linter in production





















Quick Start
Add cpp-linter-action to your workflow in seconds:
steps:
- uses: actions/checkout@v5
- uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: 'file' # Use .clang-format config file
tidy-checks: '' # Use .clang-tidy config file
# only 'update' a single comment in a pull request thread.
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}
- name: Fail fast?!
if: steps.linter.outputs.checks-failed > 0
run: exit 1
Add to your .pre-commit-config.yaml
:
repos:
- repo: https://github.com/cpp-linter/cpp-linter-hooks
rev: v1.1.5 # Use the tag or commit you want
hooks:
- id: clang-format
args: [--style=Google] # Other coding style: LLVM, GNU, Chromium, Microsoft, Mozilla, WebKit.
- id: clang-tidy
args:
- --checks='boost-*
- bugprone-*
- performance-*
- readability-*
- portability-*
- modernize-*
- clang-analyzer-*
- cppcoreguidelines-*'
Install and run locally:
pip install cpp-linter
cpp-linter --style=file --tidy-checks='-*,readability-*' src/
Join Our Community
Be part of a growing ecosystem of C/C++ developers who care about code quality.