Skip to content

Commit 854585d

Browse files
committed
Adding cpp check workflow
1 parent 56aa51a commit 854585d

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/cppcheck.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Cppcheck Static Analysis
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
cppcheck:
10+
name: Run Cppcheck and Upload SARIF
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
submodules: true
18+
lfs: true
19+
20+
- name: Install cppcheck
21+
run: sudo apt-get update && sudo apt-get install -y cppcheck
22+
23+
- name: Run cppcheck (SARIF output)
24+
run: |
25+
mkdir -p cppcheck-output
26+
cppcheck --enable=all --inconclusive --quiet \
27+
--output-file=cppcheck-output/cppcheck.sarif \
28+
--output-format=sarif \
29+
$GITHUB_WORKSPACE/framework/src/
30+
-I $GITHUB_WORKSPACE/include/
31+
-I $GITHUB_WORKSPACE/framework/include/
32+
33+
- name: Upload SARIF to GitHub
34+
uses: github/codeql-action/upload-sarif@v3
35+
with:
36+
sarif_file: cppcheck-output/cppcheck.sarif

0 commit comments

Comments
 (0)