aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/check-c.yml16
-rw-r--r--Makefile6
2 files changed, 17 insertions, 5 deletions
diff --git a/.github/workflows/check-c.yml b/.github/workflows/check-c.yml
index deadfcb07..c308e3620 100644
--- a/.github/workflows/check-c.yml
+++ b/.github/workflows/check-c.yml
@@ -93,11 +93,13 @@ jobs:
93 run: sudo apt-get update -qy 93 run: sudo apt-get update -qy
94 - name: install cppcheck 94 - name: install cppcheck
95 run: sudo apt-get install -qy cppcheck 95 run: sudo apt-get install -qy cppcheck
96 - name: configure
97 run: >
98 ./configure CPPCHECK='cppcheck -q'
99 || (cat config.log; exit 1)
96 - run: cppcheck --version 100 - run: cppcheck --version
97 - name: cppcheck 101 - name: cppcheck
98 run: > 102 run: make cppcheck
99 cppcheck -q --force --error-exitcode=1 --enable=warning,performance
100 -i src/firejail/checkcfg.c -i src/firejail/main.c .
101 103
102 # new cppcheck version currently chokes on checkcfg.c and main.c, therefore 104 # new cppcheck version currently chokes on checkcfg.c and main.c, therefore
103 # scan all files also with older cppcheck version from ubuntu 20.04. 105 # scan all files also with older cppcheck version from ubuntu 20.04.
@@ -122,9 +124,13 @@ jobs:
122 run: sudo apt-get update -qy 124 run: sudo apt-get update -qy
123 - name: install cppcheck 125 - name: install cppcheck
124 run: sudo apt-get install -qy cppcheck 126 run: sudo apt-get install -qy cppcheck
127 - name: configure
128 run: >
129 ./configure CPPCHECK='cppcheck -q'
130 || (cat config.log; exit 1)
125 - run: cppcheck --version 131 - run: cppcheck --version
126 - name: cppcheck 132 - name: cppcheck-old
127 run: cppcheck -q --force --error-exitcode=1 --enable=warning,performance . 133 run: make cppcheck-old
128 134
129 codeql-cpp: 135 codeql-cpp:
130 permissions: 136 permissions:
diff --git a/Makefile b/Makefile
index e46eb4949..d6d4f098c 100644
--- a/Makefile
+++ b/Makefile
@@ -364,6 +364,12 @@ extras: all
364 364
365.PHONY: cppcheck 365.PHONY: cppcheck
366cppcheck: clean 366cppcheck: clean
367 $(CPPCHECK) --force --error-exitcode=1 --enable=warning,performance \
368 -i src/firejail/checkcfg.c -i src/firejail/main.c .
369
370# For cppcheck 1.x; see .github/workflows/check-c.yml
371.PHONY: cppcheck-old
372cppcheck-old: clean
367 $(CPPCHECK) --force --error-exitcode=1 --enable=warning,performance . 373 $(CPPCHECK) --force --error-exitcode=1 --enable=warning,performance .
368 374
369.PHONY: scan-build 375.PHONY: scan-build