Skip to content

Commit dc6e104

Browse files
authored
[Misc] Add cpp-linter.yml (ModelEngine-Group#422)
1 parent d2623f6 commit dc6e104

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/cpp-linter.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: cpp-linter
2+
3+
on:
4+
push:
5+
branches: [ "*" ]
6+
pull_request:
7+
branches: [ "dev*", "main", "*release" ]
8+
9+
10+
jobs:
11+
cpp-linter:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
15+
with:
16+
persist-credentials: false
17+
- uses: cpp-linter/cpp-linter-action@main
18+
id: linter
19+
continue-on-error: true
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
with:
23+
style: file
24+
tidy-checks: '-*'
25+
files-changed-only: true
26+
lines-changed-only: diff
27+
format-review: true
28+
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}
29+
30+
- name: Fail fast?!
31+
if: steps.linter.outputs.checks-failed != 0
32+
run: |
33+
echo "some linter checks failed. ${{ steps.linter.outputs.checks-failed }}"
34+
exit 1

0 commit comments

Comments
 (0)