From f4f7a814e77dc338db655987f6eb1beb6e3ae7ea Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Thu, 22 Feb 2024 10:41:35 -0300 Subject: 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 --- .github/workflows/check-c.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to '.github') 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: run: sudo apt-get update -qy - name: install cppcheck run: sudo apt-get install -qy cppcheck + - name: configure + run: > + ./configure CPPCHECK='cppcheck -q' + || (cat config.log; exit 1) - run: cppcheck --version - name: cppcheck - run: > - cppcheck -q --force --error-exitcode=1 --enable=warning,performance - -i src/firejail/checkcfg.c -i src/firejail/main.c . + run: make cppcheck # new cppcheck version currently chokes on checkcfg.c and main.c, therefore # scan all files also with older cppcheck version from ubuntu 20.04. @@ -122,9 +124,13 @@ jobs: run: sudo apt-get update -qy - name: install cppcheck run: sudo apt-get install -qy cppcheck + - name: configure + run: > + ./configure CPPCHECK='cppcheck -q' + || (cat config.log; exit 1) - run: cppcheck --version - - name: cppcheck - run: cppcheck -q --force --error-exitcode=1 --enable=warning,performance . + - name: cppcheck-old + run: make cppcheck-old codeql-cpp: permissions: -- cgit v1.2.3-70-g09d2