build: sync cppcheck targets with CI

Changes:

* Use the same command from the cppcheck CI job in the cppcheck target
* Add cppcheck-old target based on the cppcheck_old CI job
* Call the make targets in CI to avoid duplicating the commands
This commit is contained in:
Kelvin M. Klann 2024-02-22 10:41:35 -03:00
parent 93d623fdf9
commit f4f7a814e7
2 changed files with 17 additions and 5 deletions

View file

@ -364,6 +364,12 @@ extras: all
.PHONY: cppcheck
cppcheck: clean
$(CPPCHECK) --force --error-exitcode=1 --enable=warning,performance \
-i src/firejail/checkcfg.c -i src/firejail/main.c .
# For cppcheck 1.x; see .github/workflows/check-c.yml
.PHONY: cppcheck-old
cppcheck-old: clean
$(CPPCHECK) --force --error-exitcode=1 --enable=warning,performance .
.PHONY: scan-build