Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 35 additions & 66 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
[file-annotations]: https://cpp-linter.github.io/cpp-linter-rs/cli#-a-file-annotations
[thread-comments]: https://cpp-linter.github.io/cpp-linter-rs/cli#-g-thread-comments
[step-summary]: https://cpp-linter.github.io/cpp-linter-rs/cli#-w-step-summary
[tidy-review]: https://cpp-linter.github.io/cpp-linter-rs/cli#-d-tidy-review
[format-review]: https://cpp-linter.github.io/cpp-linter-rs/cli#-m-format-review
[pr-review]: https://cpp-linter.github.io/cpp-linter-rs/cli#-p-pr-review
[other-licenses]: https://cpp-linter.github.io/cpp-linter-rs/other-licenses

[format-annotations-preview]: docs/docs/images/annotations-clang-format.png
Expand All @@ -18,107 +17,74 @@
[cli-doc]: https://cpp-linter.github.io/cpp-linter-rs/cli

<!-- start -->
[![Python packaging][py-build-badge]][py-build-ci]
[![Binary executable builds][bin-build-badge]][bin-build-ci]
[![node-js builds][node-ci-badge]][node-ci]
[![Test CI][test-ci-badge]][test-ci]
[![Docs][docs-ci-badge]][docs-site]
[![Pre-commit-ci][pre-commit-badge]][pre-commit-ci]
[![codecov-status][codecov-badge]][codecov-project]
[![cpp-linter hub][cpp-linter-hub-badge]][cpp-linter-hub-link]

[cpp-linter-hub-badge]: https://img.shields.io/badge/%F0%9F%8F%A0_cpp--linter_hub-%E2%86%90_home-22863a
[cpp-linter-hub-link]: https://cpp-linter.github.io/
[py-build-ci]: https://github.com/cpp-linter/cpp-linter-rs/actions/workflows/python-packaging.yml
[py-build-badge]: https://github.com/cpp-linter/cpp-linter-rs/actions/workflows/python-packaging.yml/badge.svg
[bin-build-badge]: https://github.com/cpp-linter/cpp-linter-rs/actions/workflows/binary-builds.yml/badge.svg
[bin-build-ci]: https://github.com/cpp-linter/cpp-linter-rs/actions/workflows/binary-builds.yml
[node-ci-badge]: https://github.com/cpp-linter/cpp-linter-rs/actions/workflows/node-js-packaging.yml/badge.svg
[node-ci]: https://github.com/cpp-linter/cpp-linter-rs/actions/workflows/node-js-packaging.yml
[test-ci-badge]: https://github.com/cpp-linter/cpp-linter-rs/actions/workflows/run-dev-tests.yml/badge.svg
[test-ci]: https://github.com/cpp-linter/cpp-linter-rs/actions/workflows/run-dev-tests.yml
[docs-ci-badge]: https://github.com/cpp-linter/cpp-linter-rs/actions/workflows/build-docs.yml/badge.svg
[docs-site]: https://cpp-linter.github.io/cpp-linter-rs
[pre-commit-badge]: https://github.com/cpp-linter/cpp-linter-rs/actions/workflows/pre-commit-hooks.yml/badge.svg
[pre-commit-ci]: https://github.com/cpp-linter/cpp-linter-rs/actions/workflows/pre-commit-hooks.yml
[codecov-badge]: https://codecov.io/gh/cpp-linter/cpp-linter-rs/graph/badge.svg?token=7ibzERx2AD
[codecov-project]: https://codecov.io/gh/cpp-linter/cpp-linter-rs
[docs-rs-badge]: https://img.shields.io/docsrs/cpp-linter?label=docs.rs
[docs-rs]: https://docs.rs/cpp-linter
[pypi-badge]: https://img.shields.io/pypi/v/cpp-linter
[pypi-pkg]: https://pypi.org/project/cpp-linter/
[test-pypi-badge]: https://img.shields.io/pypi/v/cpp-linter?pypiBaseUrl=https%3A%2F%2Ftest.pypi.org&label=test-pypi
[test-pypi-pkg]: https://test.pypi.org/project/cpp-linter/
[crates-io-badge]: https://img.shields.io/crates/v/cpp-linter
[crates-io-pkg]: https://crates.io/crates/cpp-linter
[npm-badge]: https://img.shields.io/npm/v/%40cpp-linter%2Fcpp-linter
[npm-pkg]: https://www.npmjs.com/package/@cpp-linter/cpp-linter
# cpp-linter-rs

# C/C++ Linting Package
[![v2 release candidate](https://img.shields.io/badge/v2-release%20candidate-975a16?labelColor=454a63)](https://github.com/cpp-linter/cpp-linter-rs/releases)
[![ci](https://img.shields.io/github/actions/workflow/status/cpp-linter/cpp-linter-rs/run-dev-tests.yml?branch=main&label=ci&labelColor=454a63)](https://github.com/cpp-linter/cpp-linter-rs/actions/workflows/run-dev-tests.yml)
[![coverage](https://img.shields.io/codecov/c/github/cpp-linter/cpp-linter-rs?labelColor=454a63)](https://codecov.io/gh/cpp-linter/cpp-linter-rs)
[![part of cpp-linter](https://img.shields.io/badge/part%20of-cpp--linter-ffc20a?labelColor=454a63)](https://cpp-linter.github.io/)

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

- [x] [thread-comments](#thread-comment)
- [x] [step-summary](#step-summary)
- [x] [file-annotations](#annotations)
- [x] [Pull Request Review](#pull-request-review) suggestions
[Website](https://cpp-linter.github.io/) ·
[Documentation](https://cpp-linter.github.io/cpp-linter-rs/) ·
[Get started](https://cpp-linter.github.io/getting-started/#locally-or-in-other-ci) ·
[Discussions](https://github.com/orgs/cpp-linter/discussions)

> [!WARNING]
> This project is still experimental and subject to drastic changes.
> This project (cpp-linter v2) is in release candidates.
> Please use the [pure python cpp-linter](https://github.com/cpp-linter/cpp-linter)
> package until this project is ready for deployment.
> package until 2.0 is released.

## Install
## Quick start

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

### Rust

[![Crates.io Version][crates-io-badge]][crates-io-pkg]
[![docs.rs][docs-rs-badge]][docs-rs]
Until 2.0 is released, crates.io only has release candidates,
so `--version` is required.

Install from source code hosted at crates.io:

```text
cargo install cpp-linter --features bin
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`](https://github.com/cargo-bins/cargo-binstall?tab=readme-ov-file#installation).

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

### Python

[![PyPI - Version][pypi-badge]][pypi-pkg]

Install the python package:

```text
pip install cpp-linter
```

[![testPyPI - Version][test-pypi-badge]][test-pypi-pkg]

Pre-releases are uploaded to test-pypi:

```text
pip install -i https://test.pypi.org/simple/ cpp-linter
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](https://github.com/cpp-linter/cpp-linter)
package from PyPI.

### Node.js

[![NPM Version][npm-badge]][npm-pkg]

Install the Node.js binding:

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

## Usage
Expand Down Expand Up @@ -157,24 +123,23 @@ Using [`--step-summary`][step-summary]:

### Pull Request Review

#### Only clang-tidy
Using [`--pr-review`][pr-review]:

Using [`--tidy-review`][tidy-review]:
#### Only clang-tidy

![sample tidy-review][tidy-review-preview]

#### Only clang-format

Using [`--format-review`][format-review]:

![sample format-review][format-review-preview]

![sample format-suggestion][format-suggestion-preview]

## Have question or feedback?
## Contributing

To provide feedback (requesting a feature or reporting a bug) please post to
[issues](https://github.com/cpp-linter/cpp-linter-rs/issues).
For development setup, see [CONTRIBUTING.md](https://github.com/cpp-linter/cpp-linter-rs/blob/main/CONTRIBUTING.md).

## License

Expand All @@ -183,4 +148,8 @@ The scripts and documentation in this project are released under the [MIT] licen
As for dependencies (that are redistributed by us in binary form) and their
licenses, refer to [THIRD-PARTY LICENSES][other-licenses].

[MIT]: https://choosealicense.com/licenses/mit
[MIT]: https://github.com/cpp-linter/cpp-linter-rs/blob/main/LICENSE
[test-pypi-badge]: https://img.shields.io/pypi/v/cpp-linter?pypiBaseUrl=https%3A%2F%2Ftest.pypi.org&label=test-pypi&labelColor=454a63&color=975a16
[test-pypi-pkg]: https://test.pypi.org/project/cpp-linter/
[npm-badge]: https://img.shields.io/npm/v/%40cpp-linter%2Fcpp-linter/next?labelColor=454a63&color=975a16
[npm-pkg]: https://www.npmjs.com/package/@cpp-linter/cpp-linter
11 changes: 8 additions & 3 deletions bindings/node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@
The node.js binding for the [cpp-linter-rs][this] rust project
(built using [napi-rs](https://napi.rs) and [yarn](https://yarnpkg.com)).

[Website](https://cpp-linter.github.io/) |
[Documentation](https://cpp-linter.github.io/cpp-linter-rs/) |
[Get started](https://cpp-linter.github.io/getting-started/#locally-or-in-other-ci) |
[Discussions](https://github.com/orgs/cpp-linter/discussions)

[this]: https://github.com/cpp-linter/cpp-linter-rs

## Install
## Quick start

Install with `npm`:

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

## Usage
Expand All @@ -19,7 +24,7 @@ For usage in a CI workflow, see
[the cpp-linter/cpp-linter-action repository](https://github.com/cpp-linter/cpp-linter-action).

For the description of supported Command Line Interface options, see
[the CLI documentation](https://cpp-linter.github.io/cpp-linter-rs/cli.html).
[the CLI documentation](https://cpp-linter.github.io/cpp-linter-rs/cli/).

## Development

Expand Down
23 changes: 13 additions & 10 deletions bindings/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,33 @@
The python binding for the [cpp-linter-rs][this] rust project
(built using [pyo3](https://pyo3.rs) and [maturin]).

[Website](https://cpp-linter.github.io/) |
[Documentation](https://cpp-linter.github.io/cpp-linter-rs/) |
[Get started](https://cpp-linter.github.io/getting-started/#locally-or-in-other-ci) |
[Discussions](https://github.com/orgs/cpp-linter/discussions)

[this]: https://github.com/cpp-linter/cpp-linter-rs
[maturin]: https://maturin.rs

## Install

Install with `pip`:

```text
pip install cpp-linter
```
## Quick start

Pre-releases are uploaded to [test-pypi](https://test.pypi.org/project/cpp-linter/):

```text
pip install -i https://test.pypi.org/simple/ cpp-linter
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 (v1.x)](https://github.com/cpp-linter/cpp-linter)
package from PyPI.

## Usage

For usage in a CI workflow, see
[the cpp-linter/cpp-linter-action repository](https://github.com/cpp-linter/cpp-linter-action).

For the description of supported Command Line Interface options, see
[the CLI documentation](https://cpp-linter.github.io/cpp-linter-rs/cli.html).
[the CLI documentation](https://cpp-linter.github.io/cpp-linter-rs/cli/).

## Development

Expand All @@ -39,7 +42,7 @@ maturin dev
Then invoke the executable script as a normal CLI app:

```text
cpp-linter -help
cpp-linter --help
```

### Folder structure
Expand Down
25 changes: 10 additions & 15 deletions cpp-linter/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@

# cpp-linter

[![crates.io][crates-io-badge]][crates-io-link]
[![docs.rs][docs-badge]][docs-link]
[![CHANGELOG][changelog-badge]][changelog-link]

This crate contains the the library used as a backend for the
This crate contains the library used as a backend for the
`cpp-linter` binary executable. The main focus of `cpp-linter` is as follows:

- [x] Lint C/C++ sources using clang-format and clang-tidy.
- [x] Respect file changes when run in a CI workflow on Github.
- [x] Provide feedback via Github's REST API in the any of the following forms:
- [x] Respect file changes when run in a CI workflow on GitHub.
- [x] Provide feedback via GitHub's REST API in any of the following forms:
- [x] step summary
- [x] thread comments
- [x] file annotation
- [x] pull request review suggestions

See also the [CLI document hosted on github][gh-pages].
[Website](https://cpp-linter.github.io/) ·
[Documentation](https://cpp-linter.github.io/cpp-linter-rs/) ·
[Get started](https://cpp-linter.github.io/getting-started/#locally-or-in-other-ci) ·
[Discussions](https://github.com/orgs/cpp-linter/discussions)

See also the [CLI document hosted on GitHub][gh-pages].

[gh-pages]: https://cpp-linter.github.io/cpp-linter-rs/cli.html
[crates-io-badge]: https://img.shields.io/crates/v/cpp-linter
[crates-io-link]: https://crates.io/crates/cpp-linter
[docs-badge]: https://img.shields.io/docsrs/cpp-linter
[docs-link]: https://docs.rs/cpp-linter
[changelog-badge]: https://img.shields.io/badge/keep_a_change_log-v1.1.0-ffec3d
[changelog-link]: https://github.com/cpp-linter/cpp-linter-rs/blob/main/cpp-linter/CHANGELOG.md
[gh-pages]: https://cpp-linter.github.io/cpp-linter-rs/cli/
Comment on lines +20 to +22

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
See also the [CLI document hosted on GitHub][gh-pages].
[gh-pages]: https://cpp-linter.github.io/cpp-linter-rs/cli.html
[crates-io-badge]: https://img.shields.io/crates/v/cpp-linter
[crates-io-link]: https://crates.io/crates/cpp-linter
[docs-badge]: https://img.shields.io/docsrs/cpp-linter
[docs-link]: https://docs.rs/cpp-linter
[changelog-badge]: https://img.shields.io/badge/keep_a_change_log-v1.1.0-ffec3d
[changelog-link]: https://github.com/cpp-linter/cpp-linter-rs/blob/main/cpp-linter/CHANGELOG.md
[gh-pages]: https://cpp-linter.github.io/cpp-linter-rs/cli/
See also the [CLI document hosted on GitHub][cli-doc].
[cli-doc]: https://cpp-linter.github.io/cpp-linter-rs/cli/

@shenxianpeng shenxianpeng Oct 2, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this suggestion, I can not apply them successfully

image

3 changes: 1 addition & 2 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
[file-annotations]: cli.md#-a-file-annotations
[thread-comments]: cli.md#-g-thread-comments
[step-summary]: cli.md#-w-step-summary
[tidy-review]: cli.md#-d-tidy-review
[format-review]: cli.md#-m-format-review
[pr-review]: cli.md#-p-pr-review
[other-licenses]: other-licenses.md

[format-annotations-preview]: images/annotations-clang-format.png
Expand Down
Loading