diff options
author | 2024-02-22 10:41:35 -0300 | |
---|---|---|
committer | 2024-02-24 18:53:06 -0300 | |
commit | f4f7a814e77dc338db655987f6eb1beb6e3ae7ea (patch) | |
tree | 2ce07f5877c5845c4136d57e6f110822c275ea57 /.github/workflows/check-c.yml | |
parent | build: allow overriding certain tools (diff) | |
download | firejail-f4f7a814e77dc338db655987f6eb1beb6e3ae7ea.tar.gz firejail-f4f7a814e77dc338db655987f6eb1beb6e3ae7ea.tar.zst firejail-f4f7a814e77dc338db655987f6eb1beb6e3ae7ea.zip |
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
Diffstat (limited to '.github/workflows/check-c.yml')
-rw-r--r-- | .github/workflows/check-c.yml | 16 |
1 files changed, 11 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: |