diff --git a/README.md b/README.md index 8f5e43f7..e6328fd9 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 --locked ``` 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..8f23989b 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..7c535ab8 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 (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 @@ -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