-
Notifications
You must be signed in to change notification settings - Fork 15
35 lines (33 loc) · 1.07 KB
/
cppcheck.yml
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
name: cppcheck
on: push
jobs:
build:
if: "!contains(github.event.commits[0].message, '#skipcppcheck')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout cppcheck
uses: actions/checkout@v2
with:
repository: danmar/cppcheck
ref: '2.3'
path: './cppcheck'
- name: Build cppcheck
run: |
cd cppcheck
mkdir build && cd build
cmake .. -DUSE_MATCHCOMPILER=ON
make
cp -r ../cfg ./bin
- name: Run cppcheck
run: |
cd cppcheck/build/bin
./cppcheck ../../../src --enable=all --max-ctu-depth=4 --output-file=../../../cppcheck_report.txt --language=c++ --std=c++17 --suppress=missingIncludeSystem
echo ' ' >> ../../../cppcheck_report.txt && ./cppcheck --version >> ../../../cppcheck_report.txt
- name: Commit changes
uses: EndBug/add-and-commit@v7
with:
author_name: mandyedi
author_email: [email protected]
message: 'Automated commit: update cppcheck report'
add: './cppcheck_report.txt'