Skip to content

Commit 31edb3c

Browse files
authored
docs: update README.md (#74)
1 parent 9e705e5 commit 31edb3c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
cpp-linter-hooks is a [pre-commit](https://pre-commit.com/) hook that uses `clang-format` and `clang-tidy` to format C/C++ code.
1111

1212
> [!NOTE]
13-
> This hook automatically downloads specific versions of `clang-format` or `clang-tidy` [binaries](https://github.com/cpp-linter/clang-tools-static-binaries) and installs them on your system.
13+
> This hook automatically downloads specific versions of `clang-format` or `clang-tidy` [clang-tools-static-binaries](https://github.com/cpp-linter/clang-tools-static-binaries) and installs them on your system.
1414
1515
## Usage
1616

@@ -21,7 +21,7 @@ To use cpp-linter-hooks, add the following configuration to your `.pre-commit-co
2121
```yaml
2222
repos:
2323
- repo: https://github.com/cpp-linter/cpp-linter-hooks
24-
rev: v0.8.1 # Use the ref you want to point at
24+
rev: v0.8.1 # Use the tag or commit you want
2525
hooks:
2626
- id: clang-format
2727
args: [--style=Google] # Other coding style: LLVM, GNU, Chromium, Microsoft, Mozilla, WebKit.
@@ -39,9 +39,9 @@ repos:
3939
rev: v0.8.1
4040
hooks:
4141
- id: clang-format
42-
args: [--style=file] # to load .clang-format
42+
args: [--style=file] # Loads style from .clang-format file
4343
- id: clang-tidy
44-
args: [--checks=.clang-tidy] # path/to/.clang-tidy
44+
args: [--checks=.clang-tidy] # Loads checks from .clang-tidy file
4545
```
4646

4747
To use specific versions of [clang-tools](https://github.com/cpp-linter/clang-tools-pip?tab=readme-ov-file#supported-versions):
@@ -54,7 +54,7 @@ repos:
5454
- id: clang-format
5555
args: [--style=file, --version=18] # Specifies version
5656
- id: clang-tidy
57-
args: [--checks=.clang-tidy, --version=18] # Specifies version
57+
args: [--checks=.clang-tidy, --version=18] # Specifies version
5858
```
5959

6060
> [!IMPORTANT]
@@ -65,10 +65,10 @@ repos:
6565
- repo: https://github.com/cpp-linter/cpp-linter-hooks
6666
rev: v0.8.1
6767
hooks:
68-
- id: clang-format
68+
- id: clang-format
6969
args: [--style=file, --version=18]
70-
files: ^(src|include)/.*\.(cpp|cc|cxx|h|hpp)$ # limit the scope
71-
- id: clang-tidy
70+
files: ^(src|include)/.*\.(cpp|cc|cxx|h|hpp)$ # Limits to specific dirs and file types
71+
- id: clang-tidy
7272
args: [--checks=.clang-tidy, --version=18]
7373
files: ^(src|include)/.*\.(cpp|cc|cxx|h|hpp)$
7474
```

0 commit comments

Comments
 (0)