From 699fa401da44d93decfdf20e9d3cd4456b3d5bd8 Mon Sep 17 00:00:00 2001 From: Xianpeng Shen Date: Thu, 1 Oct 2026 19:10:31 +0300 Subject: [PATCH 1/5] docs: rework the READMEs to the org layout and fix the install commands Follow the layout the other cpp-linter READMEs move to. The root README gets four badges (release candidate, ci, coverage, part of), the title cpp-linter-rs and a link line; the package READMEs get the link line. The install commands failed or installed something else: - cargo install and cargo binstall pick 2.0.0-rc9 without --version, which has no bin feature; pin 2.0.0-rc.23. - pip install cpp-linter installs the Python package 1.14.1, and the TestPyPI command needs --pre. - npm's latest tag is the deprecated rc2; install @next. --tidy-review and --format-review were replaced by --pr-review (#377), so the example links to --pr-review, and docs/docs/index.md defines it. Drop the crates.io, PyPI and npm badges that showed rc9, 1.14.1 or rc2, fix the cli.html links (404) in the package READMEs, and use the website's release-candidate wording in the warning. --- README.md | 101 +++++++++++++------------------------- bindings/node/README.md | 11 +++-- bindings/python/README.md | 23 +++++---- cpp-linter/README.md | 25 ++++------ docs/docs/index.md | 3 +- 5 files changed, 67 insertions(+), 96 deletions(-) diff --git a/README.md b/README.md index 8f5e43f7..965332c0 100644 --- a/README.md +++ b/README.md @@ -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 @@ -18,71 +17,42 @@ [cli-doc]: https://cpp-linter.github.io/cpp-linter-rs/cli -[![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 ``` Install a pre-compiled binary from GitHub releases: @@ -90,27 +60,23 @@ 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] @@ -118,7 +84,7 @@ pip install -i https://test.pypi.org/simple/ cpp-linter Install the Node.js binding: ```text -npm -g install @cpp-linter/cpp-linter +npm -g install @cpp-linter/cpp-linter@next ``` ## Usage @@ -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 @@ -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 diff --git a/bindings/node/README.md b/bindings/node/README.md index 1b694416..e38139de 100644 --- a/bindings/node/README.md +++ b/bindings/node/README.md @@ -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 @@ -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 diff --git a/bindings/python/README.md b/bindings/python/README.md index 79b9f787..a9f06355 100644 --- a/bindings/python/README.md +++ b/bindings/python/README.md @@ -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](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 @@ -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 diff --git a/cpp-linter/README.md b/cpp-linter/README.md index 3630df17..5b9a47cb 100644 --- a/cpp-linter/README.md +++ b/cpp-linter/README.md @@ -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/ diff --git a/docs/docs/index.md b/docs/docs/index.md index e13f7edf..a564adfd 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -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 From c39a583dcaf3ee3023f3739b92e1fd315bb063e7 Mon Sep 17 00:00:00 2001 From: Xianpeng Shen Date: Fri, 2 Oct 2026 11:08:24 +0300 Subject: [PATCH 2/5] Update bindings/node/README.md Co-authored-by: Brendan <2bndy5@gmail.com> --- bindings/node/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/node/README.md b/bindings/node/README.md index e38139de..8f23989b 100644 --- a/bindings/node/README.md +++ b/bindings/node/README.md @@ -3,9 +3,9 @@ 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) · +[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 From 1b5caa77acba1124c8c19c454c2d6911ab098c0c Mon Sep 17 00:00:00 2001 From: Xianpeng Shen Date: Fri, 2 Oct 2026 11:08:32 +0300 Subject: [PATCH 3/5] Update bindings/python/README.md Co-authored-by: Brendan <2bndy5@gmail.com> --- bindings/python/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/python/README.md b/bindings/python/README.md index a9f06355..b55021ff 100644 --- a/bindings/python/README.md +++ b/bindings/python/README.md @@ -3,9 +3,9 @@ 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) · +[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 From 38cae019cc52bc6f6a5181146fd2469091a51629 Mon Sep 17 00:00:00 2001 From: Xianpeng Shen Date: Fri, 2 Oct 2026 11:08:40 +0300 Subject: [PATCH 4/5] Update bindings/python/README.md Co-authored-by: Brendan <2bndy5@gmail.com> --- bindings/python/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/python/README.md b/bindings/python/README.md index b55021ff..7c535ab8 100644 --- a/bindings/python/README.md +++ b/bindings/python/README.md @@ -20,7 +20,7 @@ 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) +[pure python cpp-linter (v1.x)](https://github.com/cpp-linter/cpp-linter) package from PyPI. ## Usage From f6abc2aa9b166a6b69ad868614783e4712ec58e5 Mon Sep 17 00:00:00 2001 From: Xianpeng Shen Date: Fri, 2 Oct 2026 11:09:04 +0300 Subject: [PATCH 5/5] Update README.md Co-authored-by: Brendan <2bndy5@gmail.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 965332c0..e6328fd9 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ so `--version` is required. Install from source code hosted at crates.io: ```text -cargo install cpp-linter --version 2.0.0-rc.23 --features bin +cargo install cpp-linter --version 2.0.0-rc.23 --features bin --locked ``` Install a pre-compiled binary from GitHub releases: