We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2efe05c commit 8775512Copy full SHA for 8775512
.github/workflows/example2.yml
@@ -13,9 +13,17 @@ jobs:
13
- uses: actions/checkout@v4
14
15
- name: install g++
16
- run: sudo apt install -y g++
+ run: sudo apt install -y g++ cppcheck
17
+
18
+ - name: run cppcheck
19
+ run: |
20
+ cppcheck hello_world.cpp --output-file=report.txt
21
+ if [ -s report.txt ]; then # if file is not empty
22
+ cat report.txt
23
+ exit 1 # let github action fails
24
+ fi
25
26
- name: check build
27
run: |
- g++ hello_world.cpp -Wall -Werror -o hello_world
- # ./hello_world
28
+ g++ hello_world.cpp -o hello_world
29
+ ./hello_world
0 commit comments