Skip to content

Commit d1e8104

Browse files
committed
Improve docs onboarding
1 parent 865431d commit d1e8104

4 files changed

Lines changed: 60 additions & 292 deletions

File tree

docs/getting-started.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,27 @@
22

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

5+
## What is cpp-linter?
6+
7+
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.
8+
9+
- `clang-format` checks formatting against a named style or your `.clang-format` file.
10+
- `clang-tidy` runs static-analysis and modernization checks, usually configured by `.clang-tidy`.
11+
- cpp-linter packages those tools into integrations with consistent defaults, reporting, and failure controls.
12+
513
## Choose Your Integration
614

715
<!-- markdownlint-disable MD033 -->
816

917
Select the method that best fits your development workflow:
1018

19+
| Use case | Recommended entry point |
20+
| --- | --- |
21+
| GitHub pull request checks | [cpp-linter-action](https://cpp-linter.github.io/cpp-linter-action/) |
22+
| Local checks before commits | [cpp-linter-hooks](https://github.com/cpp-linter/cpp-linter-hooks) |
23+
| Custom scripts or CI jobs | [cpp-linter CLI](https://cpp-linter.github.io/cpp-linter/) |
24+
| High-performance local runs | [cpp-linter-rs](https://cpp-linter.github.io/cpp-linter-rs/) |
25+
1126
<div class="grid cards" markdown>
1227

1328
- :material-github: **GitHub Actions**
@@ -52,6 +67,41 @@ Select the method that best fits your development workflow:
5267

5368
</div>
5469

70+
## Minimal Examples
71+
72+
=== "GitHub Actions"
73+
74+
```yaml
75+
steps:
76+
- uses: actions/checkout@v5
77+
- uses: cpp-linter/cpp-linter-action@v2
78+
env:
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
with:
81+
style: file
82+
tidy-checks: ""
83+
```
84+
85+
=== "Pre-commit"
86+
87+
```yaml
88+
repos:
89+
- repo: https://github.com/cpp-linter/cpp-linter-hooks
90+
rev: v1.2.0
91+
hooks:
92+
- id: clang-format
93+
args: [--style=file]
94+
- id: clang-tidy
95+
args: [--checks=-*,bugprone-*,performance-*,readability-*]
96+
```
97+
98+
=== "Command Line"
99+
100+
```bash
101+
pip install cpp-linter
102+
cpp-linter --style=file --tidy-checks='-*,bugprone-*,performance-*,readability-*' src/
103+
```
104+
55105
## Clang Tools Distribution
56106

57107
<div class="grid cards" markdown>

docs/index.md

Lines changed: 6 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ template: home.html
66
title: C/C++ Linting
77
---
88

9-
<!-- markdownlint-disable MD041 MD033 MD036 MD025 -->
10-
11-
# C/C++ Linting
12-
13-
## Everything you need for linting C/C++ code
9+
<!-- markdownlint-disable MD041 MD033 MD036 -->
1410

1511
<div class="grid cards" markdown>
1612

@@ -34,21 +30,13 @@ title: C/C++ Linting
3430

3531
</div>
3632

37-
<div class="grid" markdown>
38-
39-
</div>
40-
41-
## Trusted by developers worldwide
33+
## Used across open-source projects
4234

4335
<div class="trusted-by" markdown>
4436

45-
**Join thousands of developers and organizations using cpp-linter in production**
37+
Examples of public GitHub organizations and projects where cpp-linter usage has been seen. This list is a discovery aid, not an endorsement.
4638

4739
<div class="logo-grid">
48-
<div class="logo-item">
49-
<img src="https://github.com/microsoft.png" alt="Microsoft" title="Microsoft">
50-
<span>Microsoft</span>
51-
</div>
5240
<div class="logo-item">
5341
<img src="https://github.com/apache.png" alt="Apache" title="Apache">
5442
<span>Apache</span>
@@ -93,18 +81,6 @@ title: C/C++ Linting
9381
<img src="https://github.com/LedgerHQ.png" alt="LedgerHQ" title="LedgerHQ">
9482
<span>LedgerHQ</span>
9583
</div>
96-
<div class="logo-item">
97-
<img src="https://github.com/LLNL.png" alt="LLNL" title="LLNL">
98-
<span>LLNL</span>
99-
</div>
100-
<div class="logo-item">
101-
<img src="https://github.com/cohere-ai.png" alt="cohere" title="cohere">
102-
<span>cohere</span>
103-
</div>
104-
<div class="logo-item">
105-
<img src="https://github.com/diasurgical.png" alt="Diasurgical" title="Diasurgical">
106-
<span>Diasurgical</span>
107-
</div>
10884
<div class="logo-item">
10985
<img src="https://github.com/KhronosGroup.png" alt="Khronos Group" title="Khronos Group">
11086
<span>Khronos Group</span>
@@ -121,31 +97,8 @@ title: C/C++ Linting
12197
<img src="https://github.com/Cambridge-ICCS.png" alt="Cambridge ICCS" title="Cambridge ICCS">
12298
<span>Cambridge ICCS</span>
12399
</div>
124-
<div class="logo-item">
125-
<img src="https://github.com/openMSL.png" alt="OpenMSL" title="OpenMSL">
126-
<span>OpenMSL</span>
127-
</div>
128-
<div class="logo-item">
129-
<img src="https://github.com/xemu-project.png" alt="Xemu Project" title="Xemu Project">
130-
<span>Xemu Project</span>
131-
</div>
132100
</div>
133101

134-
<!-- <div class="stats-grid">
135-
<div class="stat">
136-
<strong>1,000+</strong>
137-
<span>GitHub Users</span>
138-
</div>
139-
<div class="stat">
140-
<strong>20K+</strong>
141-
<span>Downloads/Month</span>
142-
</div>
143-
<div class="stat">
144-
<strong>50+</strong>
145-
<span>Contributors</span>
146-
</div>
147-
</div> -->
148-
149102
</div>
150103

151104
## Quick Start
@@ -179,18 +132,10 @@ title: C/C++ Linting
179132
- repo: https://github.com/cpp-linter/cpp-linter-hooks
180133
rev: v1.2.0 # Use the tag or commit you want
181134
hooks:
182-
- id: clang-format
135+
- id: clang-format
183136
args: [--style=Google] # Other coding style: LLVM, GNU, Chromium, Microsoft, Mozilla, WebKit.
184-
- id: clang-tidy
185-
args:
186-
- --checks='boost-*
187-
- bugprone-*
188-
- performance-*
189-
- readability-*
190-
- portability-*
191-
- modernize-*
192-
- clang-analyzer-*
193-
- cppcoreguidelines-*'
137+
- id: clang-tidy
138+
args: [--checks=-*,bugprone-*,performance-*,readability-*]
194139
```
195140

196141
=== "Command Line"

0 commit comments

Comments
 (0)