Skip to content

About

A CLI tool that scans a batch of files with clang-tidy and/or clang-format, then provides feedback in the form of comments, annotations, summaries, and reviews.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

2 watching

Forks

Latest commit

 

History

456 Commits

Folders and files

Repository files navigation

cpp-linter-rs

v2 release candidate ci coverage part of cpp-linter

A package for linting C/C++ code with clang-tidy and/or clang-format to collect feedback provided in the form of thread comments, a step summary, file annotations and pull request review suggestions.

Website | Documentation | Get started | Discussions

Warning

This project (cpp-linter v2) is in release candidates. Please use the pure python cpp-linter package until 2.0 is released.

Quick start

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

Rust

Crates.io Version

Until 2.0 is released, crates.io only has release candidates, so --version is required.

Install from source code hosted at crates.io:

cargo install cpp-linter --version 2.0.0-rc.23 --features bin --locked

Install a pre-compiled binary from GitHub releases:

First install cargo-binstall.

cargo binstall cpp-linter --version 2.0.0-rc.23

Python

testPyPI - Version

Pre-releases are uploaded to test-pypi:

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

Until 2.0 is released, pip install cpp-linter installs the pure python cpp-linter package from PyPI.

Node.js

NPM Version

Install the Node.js binding:

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

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:

In the pull request's changed files

clang-tidy annotation clang-tidy annotation

In the workflow run summary

annotations in the workflow run summary annotations in the workflow run summary

Thread Comment

Using --thread-comments:

sample thread-comment sample thread-comment

Step Summary

Using --step-summary:

step summary step summary

Pull Request Review

Using --pr-review:

sample pr-review sample pr-review

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. For development setup, see CONTRIBUTING.md.

License

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

As for dependencies (that are redistributed by us in binary form) and their licenses, refer to THIRD-PARTY LICENSES.

About

A CLI tool that scans a batch of files with clang-tidy and/or clang-format, then provides feedback in the form of comments, annotations, summaries, and reviews.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages