-
-
Notifications
You must be signed in to change notification settings - Fork 8
49 lines (41 loc) · 1.38 KB
/
Copy pathcppcheck.yml
File metadata and controls
49 lines (41 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Cppcheck
on: [pull_request]
env:
WORKSPACE: ${{ github.workspace }}
jobs:
cppcheck:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup cppcheck
run: |
sudo apt-get update
sudo apt-get install cppcheck
- name: Run cppcheck
run: |
cd ${{ env.WORKSPACE }}
cppcheck \
--enable=warning,style,performance,portability \
--suppress=missingIncludeSystem \
--suppress=unusedFunction \
--suppress=syntaxError:*/UnitTest/* \
--inline-suppr \
--output-file=cppcheck-result.txt \
--quiet \
-I Library \
-j $(nproc) \
Library/PAX_GRAPHICA \
Library/PAX_MAHOROBA \
Library/PAX_SAPIENTICA \
Projects/MapViewer \
Projects/IntegrationTest \
Projects/UnitTest
- name: Setup reviewdog
uses: reviewdog/action-setup@80a06617492b461a66508e2dedf16233f0506804
- name: Comment GitHub Pull Request
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cat cppcheck-result.txt | grep "\bwarning: " | reviewdog -efm="%f:%l:%c:%m" -reporter=github-pr-review -name="cppcheck-warning"
cat cppcheck-result.txt | grep "\berror: " | reviewdog -efm="%f:%l:%c:%m" -reporter=github-pr-review -name="cppcheck-error"