|
88 | 88 |
|
89 | 89 | <nav id="sidebar" class="sidebar" aria-label="Table of contents">
|
90 | 90 | <div class="sidebar-scrollbox">
|
91 |
| - <ol class="chapter"><li class="chapter-item expanded "><a href="index.html" class="active"><strong aria-hidden="true">1.</strong> Introduction</a></li><li class="chapter-item expanded "><a href="cli.html"><strong aria-hidden="true">2.</strong> Command Line Interface</a></li><li class="chapter-item expanded "><a href="permissions.html"><strong aria-hidden="true">3.</strong> Token Permissions</a></li><li class="chapter-item expanded "><a href="pr-review-caveats.html"><strong aria-hidden="true">4.</strong> Pull Request Review Caveats</a></li></ol> |
| 91 | + <ol class="chapter"><li class="chapter-item expanded "><a href="index.html" class="active"><strong aria-hidden="true">1.</strong> Introduction</a></li><li class="chapter-item expanded "><a href="cli.html"><strong aria-hidden="true">2.</strong> Command Line Interface</a></li><li class="chapter-item expanded "><a href="permissions.html"><strong aria-hidden="true">3.</strong> Token Permissions</a></li><li class="chapter-item expanded "><a href="pr-review-caveats.html"><strong aria-hidden="true">4.</strong> Pull Request Review Caveats</a></li><li class="chapter-item expanded "><a href="python.html"><strong aria-hidden="true">5.</strong> Python Binding</a></li><li class="chapter-item expanded "><a href="node.html"><strong aria-hidden="true">6.</strong> Node.js Binding</a></li></ol> |
92 | 92 | </div>
|
93 | 93 | <div id="sidebar-resize-handle" class="sidebar-resize-handle">
|
94 | 94 | <div class="sidebar-resize-indicator"></div>
|
@@ -243,35 +243,87 @@ <h1 class="menu-title">cpp-linter</h1>
|
243 | 243 | }
|
244 | 244 |
|
245 | 245 | </style>
|
246 |
| -<!-- markdownlint-disable MD041 --> |
247 |
| -<!-- markdownlint-disable MD041 --> |
| 246 | +<!-- markdownlint-disable MD041 MD053 --> |
248 | 247 | <p><a href="https://github.com/cpp-linter/cpp_linter_rs/actions/workflows/python-packaging.yml"><img src="https://github.com/cpp-linter/cpp_linter_rs/actions/workflows/python-packaging.yml/badge.svg" alt="Python packaging" /></a>
|
249 | 248 | <a href="https://github.com/cpp-linter/cpp_linter_rs/actions/workflows/binary-builds.yml"><img src="https://github.com/cpp-linter/cpp_linter_rs/actions/workflows/binary-builds.yml/badge.svg" alt="Binary executable builds" /></a>
|
250 | 249 | <a href="https://github.com/cpp-linter/cpp_linter_rs/actions/workflows/node-js-packaging.yml"><img src="https://github.com/cpp-linter/cpp_linter_rs/actions/workflows/node-js-packaging.yml/badge.svg" alt="node-js builds" /></a>
|
251 | 250 | <a href="https://github.com/cpp-linter/cpp_linter_rs/actions/workflows/run-dev-tests.yml"><img src="https://github.com/cpp-linter/cpp_linter_rs/actions/workflows/run-dev-tests.yml/badge.svg" alt="Test CI" /></a>
|
252 | 251 | <a href="https://cpp-linter.github.io/cpp_linter_rs"><img src="https://github.com/cpp-linter/cpp_linter_rs/actions/workflows/build-docs.yml/badge.svg" alt="Docs" /></a>
|
253 |
| -<a href="https://github.com/cpp-linter/cpp_linter_rs/actions/workflows/pre-commit-hooks.yml"><img src="https://github.com/cpp-linter/cpp_linter_rs/actions/workflows/pre-commit-hooks.yml/badge.svg" alt="Pre-commit-ci" /></a></p> |
254 |
| -<p><a href="https://codecov.io/gh/cpp-linter/cpp_linter_rs"><img src="https://codecov.io/gh/cpp-linter/cpp_linter_rs/graph/badge.svg?token=7ibzERx2AD" alt="codecov-status" /></a> |
255 |
| -<a href="https://docs.rs/cpp-linter"><img src="https://img.shields.io/docsrs/cpp-linter?label=docs.rs" alt="docs.rs" /></a> |
256 |
| -<a href="https://pypi.org/project/cpp-linter/"><img src="https://img.shields.io/pypi/v/cpp-linter" alt="PyPI - Version" /></a> |
257 |
| -<a href="https://crates.io/crates/cpp-linter"><img src="https://img.shields.io/crates/v/cpp-linter" alt="Crates.io Version" /></a> |
258 |
| -<a href="https://www.npmjs.com/package/@cpp-linter/cpp-linter"><img src="https://img.shields.io/npm/v/%40cpp-linter%2Fcpp-linter" alt="NPM Version" /></a></p> |
| 252 | +<a href="https://github.com/cpp-linter/cpp_linter_rs/actions/workflows/pre-commit-hooks.yml"><img src="https://github.com/cpp-linter/cpp_linter_rs/actions/workflows/pre-commit-hooks.yml/badge.svg" alt="Pre-commit-ci" /></a> |
| 253 | +<a href="https://codecov.io/gh/cpp-linter/cpp_linter_rs"><img src="https://codecov.io/gh/cpp-linter/cpp_linter_rs/graph/badge.svg?token=7ibzERx2AD" alt="codecov-status" /></a></p> |
259 | 254 | <h1 id="cc-linting-package"><a class="header" href="#cc-linting-package">C/C++ Linting Package</a></h1>
|
260 |
| -<p>A Python and Rust package for linting C/C++ code with clang-tidy and/or clang-format to collect feedback provided in the form of thread comments, step summary, or file annotations.</p> |
| 255 | +<p>A package for linting C/C++ code with clang-tidy and/or clang-format to collect feedback provided in the form of</p> |
| 256 | +<ul> |
| 257 | +<li><input disabled="" type="checkbox" checked=""/> |
| 258 | +<a href="#thread-comment">thread-comments</a></li> |
| 259 | +<li><input disabled="" type="checkbox" checked=""/> |
| 260 | +<a href="#step-summary">step-summary</a></li> |
| 261 | +<li><input disabled="" type="checkbox" checked=""/> |
| 262 | +<a href="#annotations">file-annotations</a></li> |
| 263 | +<li><input disabled="" type="checkbox" checked=""/> |
| 264 | +<a href="#pull-request-review">Pull Request Review</a> suggestions</li> |
| 265 | +</ul> |
261 | 266 | <div class="mdbook-alerts mdbook-alerts-caution">
|
262 | 267 | <p class="mdbook-alerts-title">
|
263 | 268 | <span class="mdbook-alerts-icon"></span>
|
264 | 269 | caution
|
265 | 270 | </p>
|
266 | 271 | <p>This project is still experimental and subject to drastic changes.
|
267 |
| -Please use the pure python <a href="https://github.com/cpp-linter/cpp-linter">cpp-linter</a> |
| 272 | +Please use the <a href="https://github.com/cpp-linter/cpp-linter">pure python cpp-linter</a> |
268 | 273 | package until this project is ready for deployment.</p>
|
269 | 274 | </div>
|
| 275 | +<h2 id="install"><a class="header" href="#install">Install</a></h2> |
| 276 | +<p>This package is available in several programming languages (through their respective package managers).</p> |
| 277 | +<h3 id="rust"><a class="header" href="#rust">Rust</a></h3> |
| 278 | +<p><a href="https://crates.io/crates/cpp-linter"><img src="https://img.shields.io/crates/v/cpp-linter" alt="Crates.io Version" /></a> |
| 279 | +<a href="https://docs.rs/cpp-linter"><img src="https://img.shields.io/docsrs/cpp-linter?label=docs.rs" alt="docs.rs" /></a></p> |
| 280 | +<p>Install from source code hosted at crates.io:</p> |
| 281 | +<pre><code class="language-text">cargo install cpp-linter |
| 282 | +</code></pre> |
| 283 | +<p>Install a pre-compiled binary from GitHub releases:</p> |
| 284 | +<p>First <a href="https://github.com/cargo-bins/cargo-binstall?tab=readme-ov-file#installation">install <code>cargo-binstall</code></a>.</p> |
| 285 | +<pre><code class="language-text">cargo binstall cpp-linter |
| 286 | +</code></pre> |
| 287 | +<h3 id="python"><a class="header" href="#python">Python</a></h3> |
| 288 | +<p><a href="https://pypi.org/project/cpp-linter/"><img src="https://img.shields.io/pypi/v/cpp-linter" alt="PyPI - Version" /></a></p> |
| 289 | +<p>Install the python package:</p> |
| 290 | +<pre><code class="language-text">pip install cpp-linter |
| 291 | +</code></pre> |
| 292 | +<p><a href="https://test.pypi.org/project/cpp-linter/"><img src="https://img.shields.io/pypi/v/cpp-linter?pypiBaseUrl=https%3A%2F%2Ftest.pypi.org&label=test-pypi" alt="testPyPI - Version" /></a></p> |
| 293 | +<p>Pre-releases are uploaded to test-pypi:</p> |
| 294 | +<pre><code class="language-text">pip install -i https://test.pypi.org/simple/ cpp-linter |
| 295 | +</code></pre> |
| 296 | +<h3 id="nodejs"><a class="header" href="#nodejs">Node.js</a></h3> |
| 297 | +<p><a href="https://www.npmjs.com/package/@cpp-linter/cpp-linter"><img src="https://img.shields.io/npm/v/%40cpp-linter%2Fcpp-linter" alt="NPM Version" /></a></p> |
| 298 | +<p>Install the Node.js binding:</p> |
| 299 | +<pre><code class="language-text">npm -g install @cpp-linter/cpp-linter |
| 300 | +</code></pre> |
270 | 301 | <h2 id="usage"><a class="header" href="#usage">Usage</a></h2>
|
271 | 302 | <p>For usage in a CI workflow, see
|
272 | 303 | <a href="https://github.com/cpp-linter/cpp-linter-action">the cpp-linter/cpp-linter-action repository</a>.</p>
|
273 | 304 | <p>For the description of supported Command Line Interface options, see
|
274 | 305 | <a href="https://cpp-linter.github.io/cpp_linter_rs/cli.html">the CLI documentation</a>.</p>
|
| 306 | +<h2 id="example"><a class="header" href="#example">Example</a></h2> |
| 307 | +<h3 id="annotations"><a class="header" href="#annotations">Annotations</a></h3> |
| 308 | +<p>Using <a href="cli.html#-a---file-annotations"><code>--file-annotations</code></a>:</p> |
| 309 | +<h4 id="clang-format-annotations"><a class="header" href="#clang-format-annotations">clang-format annotations</a></h4> |
| 310 | +<p><img src="images/annotations-clang-format.png" alt="clang-format annotations" /></p> |
| 311 | +<h4 id="clang-tidy-annotations"><a class="header" href="#clang-tidy-annotations">clang-tidy annotations</a></h4> |
| 312 | +<p><img src="images/annotations-clang-tidy.png" alt="clang-tidy annotations" /></p> |
| 313 | +<h3 id="thread-comment"><a class="header" href="#thread-comment">Thread Comment</a></h3> |
| 314 | +<p>Using <a href="cli.html#-g---thread-comments"><code>--thread-comments</code></a>:</p> |
| 315 | +<p><img src="images/comment.png" alt="sample thread-comment" /></p> |
| 316 | +<h3 id="step-summary"><a class="header" href="#step-summary">Step Summary</a></h3> |
| 317 | +<p>Using <a href="cli.html#-w---step-summary"><code>--step-summary</code></a>:</p> |
| 318 | +<p><img src="images/step-summary.png" alt="step summary" /></p> |
| 319 | +<h3 id="pull-request-review"><a class="header" href="#pull-request-review">Pull Request Review</a></h3> |
| 320 | +<h4 id="only-clang-tidy"><a class="header" href="#only-clang-tidy">Only clang-tidy</a></h4> |
| 321 | +<p>Using <a href="cli.html#-d---tidy-review"><code>--tidy-review</code></a>:</p> |
| 322 | +<p><img src="images/tidy-review.png" alt="sample tidy-review" /></p> |
| 323 | +<h4 id="only-clang-format"><a class="header" href="#only-clang-format">Only clang-format</a></h4> |
| 324 | +<p>Using <a href="cli.html#-m---format-review"><code>--format-review</code></a>:</p> |
| 325 | +<p><img src="images/format-review.png" alt="sample format-review" /></p> |
| 326 | +<p><img src="images/format-suggestion.png" alt="sample format-suggestion" /></p> |
275 | 327 | <h2 id="have-question-or-feedback"><a class="header" href="#have-question-or-feedback">Have question or feedback?</a></h2>
|
276 | 328 | <p>To provide feedback (requesting a feature or reporting a bug) please post to
|
277 | 329 | <a href="https://github.com/cpp-linter/cpp_linter_rs/issues">issues</a>.</p>
|
@@ -345,6 +397,11 @@ <h2 id="license"><a class="header" href="#license">License</a></h2>
|
345 | 397 | <ul>
|
346 | 398 | <li><a href="https://crates.io/crates/pyo3">pyo3</a>:
|
347 | 399 | Dual-licensed under <a href="https://choosealicense.com/licenses/apache-2.0/">Apache 2.0</a> or <a href="https://choosealicense.com/licenses/mit">MIT</a>.</li>
|
| 400 | +</ul> |
| 401 | +<p>The node binding uses</p> |
| 402 | +<ul> |
| 403 | +<li><a href="https://crates.io/crates/napi">napi</a>: Licensed under <a href="https://choosealicense.com/licenses/mit">MIT</a></li> |
| 404 | +<li><a href="https://crates.io/crates/napi-derive">napi-derive</a>: Licensed under <a href="https://choosealicense.com/licenses/mit">MIT</a></li> |
348 | 405 | </ul>
|
349 | 406 |
|
350 | 407 | </main>
|
|
0 commit comments