Skip to content

Commit 0dedcbb

Browse files
author
shenxianpeng
committed
Update README.md
1 parent b901c51 commit 0dedcbb

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

README.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
1+
# cpp-linter-action
2+
13
Github Actions for linting the C/C++ code. Uses clang-tidy, clang-format, and cppcheck.
24

3-
Example of usage:
5+
## Integration with GitHub Actions
6+
7+
For example, create a `.yml` file like `.github/workflows/cpp-linter.yml`.
48

59
```
6-
name: c-linter
10+
name: cpp-linter
711
812
on: [pull_request]
913
jobs:
10-
c-linter:
11-
name: c-linter
14+
cpp-linter:
15+
name: cpp-linter
1216
runs-on: ubuntu-latest
1317
steps:
14-
- name: c-linter
18+
- name: cpp-linter
1519
uses: shenxianpeng/cpp-linter-action@master
1620
env:
1721
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1822
```
23+
## Results of GitHub Actions
24+
25+
This one has a test repository: [cpp-linter-action-demo](https://github.com/shenxianpeng/cpp-linter-action-demo)
26+
27+
You can feel free to commit C/C++ code and then see the actual results via Pull Request. such as this PR [#3](https://github.com/shenxianpeng/cpp-linter-action-demo/pull/3)
28+
29+
![github-actions bot](https://github.com/shenxianpeng/cpp-linter-action-demo/blob/master/img/result.png?raw=true)
30+

0 commit comments

Comments
 (0)