Skip to content
Merged
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
15 changes: 15 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,27 @@

Welcome to cpp-linter! This guide will help you integrate C/C++ linting into your workflow quickly and efficiently.

## What is cpp-linter?

cpp-linter connects the standard LLVM linting tools, `clang-format` and `clang-tidy`, to the places where C/C++ projects need checks: pull requests, pre-commit hooks, local scripts, and CI jobs.

- `clang-format` checks formatting against a named style or your `.clang-format` file.
- `clang-tidy` runs static-analysis and modernization checks, usually configured by `.clang-tidy`.
- cpp-linter wraps those tools into integrations with consistent defaults, reporting, and failure controls.

## Choose Your Integration

<!-- markdownlint-disable MD033 -->

Select the method that best fits your development workflow:

| Use case | Recommended entry point |
| --- | --- |
| GitHub pull request checks | [cpp-linter-action](https://cpp-linter.github.io/cpp-linter-action/) |
| Local checks before commits | [cpp-linter-hooks](https://github.com/cpp-linter/cpp-linter-hooks) |
| Custom scripts or CI jobs | [cpp-linter CLI](https://cpp-linter.github.io/cpp-linter/) |


<div class="grid cards" markdown>

- :material-github: **GitHub Actions**
Expand Down
16 changes: 4 additions & 12 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,20 +177,12 @@ title: C/C++ Linting
```yaml
repos:
- repo: https://github.com/cpp-linter/cpp-linter-hooks
rev: v1.2.0 # Use the tag or commit you want
rev: v1.4.0 # Use the tag or commit you want
hooks:
- id: clang-format
- id: clang-format
args: [--style=Google] # Other coding style: LLVM, GNU, Chromium, Microsoft, Mozilla, WebKit.
- id: clang-tidy
args:
- --checks='boost-*
- bugprone-*
- performance-*
- readability-*
- portability-*
- modernize-*
- clang-analyzer-*
- cppcoreguidelines-*'
- id: clang-tidy
args: [--checks=-*,bugprone-*,performance-*,readability-*]
```

=== "Command Line"
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ markdown_extensions:
emoji_generator: !!python/name:material.extensions.emoji.to_svg

plugins:
- search
- blog

extra_css:
Expand Down