GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • cpp-linter
  • cpp-linter
  • Pull Request Review Caveats
  • Command Line Interface Options
  • Token Permissions
  • Contributing
  • __init__
  • clang_tools
  • cli
  • clang_tools.clang_format
  • clang_tools.clang_tidy
  • clang_tools.patcher
  • rest_api
  • git

This view

  • Original page
  • New address

GeezerVison is showing cpp-linter.github.io — cpp-linter

cpp-linter¶

PyPI ci coverage part of cpp-linter

The Python command behind cpp-linter-action: it runs clang-format and clang-tidy on C and C++ files, locally or in other CI.

Website · Documentation · Get started · Discussions

Note

This is cpp-linter v1, which gets bug fixes only. New features go to v2, a rewrite in Rust that lives in the cpp-linter-rs repository and is in release candidate stage.

v2 keeps the cpp-linter name on PyPI, so pip install --upgrade cpp-linter will install v2 once 2.0 is released. To stay on v1, pin cpp-linter<2. The migration guide lists what changes.

Quick start¶

With the clang tools installed (see Limitations):

pip install "cpp-linter<2"
cpp-linter --version=21 --style=file --tidy-checks=''

Usage¶

For usage in a GitHub Actions workflow, see the cpp-linter/cpp-linter-action repository

For the description of supported Command Line Interface options, see the CLI documentation

Applying fixes¶

Passing the --fix option makes cpp-linter apply clang-format fixes in-place to any files that have formatting problems.

Note

--fix only applies clang-format fixes. clang-tidy fixes are not applied automatically.

Limitations¶

  • cpp-linter does not install the clang tools. Install them first, for example with clang-tools; without them, --version=21 falls back to whatever clang-format and clang-tidy are on your PATH.

  • It exits 0 even when checks fail, so it reports findings but does not fail a build.

  • --files-changed-only and --lines-changed-only read the local git diff, except in GitHub Actions (and Gitea Actions), where those options ask the server’s REST API for the changed files.

Sponsors¶

cpp-linter is maintained by two volunteers. Sponsor the project through Open Collective. Silver and Gold sponsors get their logo here.

Contributing¶

To provide feedback (requesting a feature or reporting a bug) please post to issues. To contribute changes, see CONTRIBUTING.rst.

License¶

The scripts and documentation in this project are released under the MIT License.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.