Skip to content

Python packaging Binary executable builds node-js builds Test CI Docs Pre-commit-ci codecov-status

C/C++ Linting Package

A package for linting C/C++ code with clang-tidy and/or clang-format to collect feedback provided in the form of

Warning

This project is still experimental and subject to drastic changes. Please use the pure python cpp-linter package until this project is ready for deployment.

Install

This package is available in several programming languages (through their respective package managers).

Rust

Crates.io Version docs.rs

Install from source code hosted at crates.io:

cargo install cpp-linter

Install a pre-compiled binary from GitHub releases:

First install cargo-binstall.

cargo binstall cpp-linter

Python

PyPI - Version

Install the python package:

pip install cpp-linter

testPyPI - Version

Pre-releases are uploaded to test-pypi:

pip install -i https://test.pypi.org/simple/ cpp-linter

Node.js

NPM Version

Install the Node.js binding:

npm -g install @cpp-linter/cpp-linter

Usage

For usage in a CI workflow, see the cpp-linter/cpp-linter-action repository.

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

Example

Annotations

Using --file-annotations:

clang-format annotations

clang-format annotations

clang-tidy annotations

clang-tidy annotations

Thread Comment

Using --thread-comments:

sample thread-comment

Step Summary

Using --step-summary:

step summary

Pull Request Review

Only clang-tidy

Using --tidy-review:

sample tidy-review

Only clang-format

Using --format-review:

sample format-review

sample format-suggestion

Have question or feedback?

To provide feedback (requesting a feature or reporting a bug) please post to issues.

License

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

Dependencies (that are redistributed by us in binary form) have the following license agreements:

The following are conditionally included in binaries (using the openssl-vendored feature on a case-by-case basis) because it is a dependency of git2:

The python binding uses

The node binding uses