Skip to content

Commit 2f028bb

Browse files
authored
Update README.md (#40)
* Update README.md * Bump version to v0.3.1
1 parent 730bc99 commit 2f028bb

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

Diff for: LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Peter Shen
3+
Copyright (c) 2022 Xianpeng Shen
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Diff for: README.md

+14-16
Original file line numberDiff line numberDiff line change
@@ -8,50 +8,50 @@
88
<!-- [![PyPI - Downloads](https://img.shields.io/pypi/dw/cpp-linter-hooks)](https://pypi.org/project/cpp-linter-hooks/) -->
99

1010

11-
Using `clang-format` and `clang-tidy` hooks with [pre-commit](https://pre-commit.com/) to lint your C/C++ code.
11+
`cpp-linter-hooks` integrates `clang-format` and `clang-tidy` hooks with [pre-commit](https://pre-commit.com/) to lint your C/C++ code efficiently.
1212

1313
> [!NOTE]
14-
> Automatically downloads a specific version of `clang-format` or `clang-tidy` [binaries](https://github.com/cpp-linter/clang-tools-static-binaries) and installs it on the system.
14+
> This hook automatically downloads a specific version of `clang-format` or `clang-tidy` [binaries](https://github.com/cpp-linter/clang-tools-static-binaries) and installs it on the system.
1515
1616
## Usage
1717

18-
Add this to your `.pre-commit-config.yaml`
18+
Add the following configuration to your `.pre-commit-config.yaml`:
1919

2020
```yaml
2121
repos:
2222
- repo: https://github.com/cpp-linter/cpp-linter-hooks
23-
rev: v0.3.0 # Use the ref you want to point at
23+
rev: v0.3.1 # Use the ref you want to point at
2424
hooks:
2525
- id: clang-format
2626
args: [--style=Google] # Other coding style: LLVM, GNU, Chromium, Microsoft, Mozilla, WebKit.
2727
- id: clang-tidy
2828
args: [--checks='boost-*,bugprone-*,performance-*,readability-*,portability-*,modernize-*,clang-analyzer-*,cppcoreguidelines-*']
2929
```
3030
31-
The example of using custom config: `.clang-format` and `.clang-tidy`
31+
To use custom configurations like `.clang-format` and `.clang-tidy`:
3232

3333
```yaml
3434
repos:
3535
- repo: https://github.com/cpp-linter/cpp-linter-hooks
36-
rev: v0.3.0
36+
rev: v0.3.1
3737
hooks:
3838
- id: clang-format
3939
args: [--style=file] # to load .clang-format
4040
- id: clang-tidy
4141
args: [--checks=.clang-tidy] # path/to/.clang-tidy
4242
```
4343

44-
The example of using any version of [clang-tools](https://github.com/cpp-linter/clang-tools-pip?tab=readme-ov-file#supported-versions).
44+
To use specific versions of [clang-tools](https://github.com/cpp-linter/clang-tools-pip?tab=readme-ov-file#supported-versions):
4545

4646
```yaml
4747
repos:
4848
- repo: https://github.com/cpp-linter/cpp-linter-hooks
49-
rev: v0.3.0
49+
rev: v0.3.1
5050
hooks:
5151
- id: clang-format
52-
args: [--style=file, --version=16]
52+
args: [--style=file, --version=16] # Specifies version
5353
- id: clang-tidy
54-
args: [--checks=.clang-tidy, --version=16]
54+
args: [--checks=.clang-tidy, --version=16] # Specifies version
5555
```
5656

5757
## Output
@@ -64,7 +64,7 @@ clang-format.............................................................Failed
6464
- files were modified by this hook
6565
```
6666

67-
Here is the diff between the modified file.
67+
The diff between the modified file is as follows:
6868

6969
```diff
7070
--- a/testing/main.c
@@ -80,9 +80,7 @@ Here is the diff between the modified file.
8080
+}
8181
```
8282

83-
Pass `--dry-run` to the `args` of `clang-format`(can also pass other arg which clang-format supports)
84-
85-
Then it will just print instead of changing the format. E.g:
83+
Use `--dry-run` in `args` of `clang-format` to print instead of changing the format, e.g.:
8684

8785
```bash
8886
clang-format.............................................................Failed
@@ -128,8 +126,8 @@ Use -header-filter=.* to display errors from all non-system headers. Use -system
128126

129127
## Contributing
130128

131-
Any contribution is very welcome, including submitting issues, PRs, etc.
129+
Contributions are very welcome, including submitting issues, PRs, etc.
132130

133131
## License
134132

135-
This project is licensed under the terms of the MIT license.
133+
[MIT](LICENSE)

0 commit comments

Comments
 (0)