Skip to content

Commit 1bbf84e

Browse files
committed
selfcheck.yml: add unusedFunction check without CLI and without GUI
1 parent 0343713 commit 1bbf84e

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/selfcheck.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,26 @@ jobs:
154154
UNUSEDFUNCTION_ONLY: 1
155155
# unusedFunction notest nocli - end
156156

157+
# unusedFunction notest nocli nogui - start
158+
- name: CMake (no test / no cli / no gui)
159+
run: |
160+
cmake -S . -B cmake.output.notest_nocli -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=Off -DBUILD_CLI=Off -DBUILD_GUI=Off -DENABLE_CHECK_INTERNAL=On
161+
162+
- name: Generate dependencies (no test / no cli / no gui)
163+
run: |
164+
# make sure the precompiled headers exist
165+
make -C cmake.output.notest_nocli_nogui lib/CMakeFiles/cppcheck-core.dir/cmake_pch.hxx.cxx
166+
167+
# TODO: find a way to report unmatched suppressions without need to add information checks
168+
- name: Self check (unusedFunction / no test / no cli / no gui)
169+
if: false # TODO: the findings are currently too intrusive
170+
run: |
171+
./cppcheck -q --template=selfcheck --error-exitcode=1 --library=cppcheck-lib --library=qt -D__CPPCHECK__ -D__GNUC__ --enable=unusedFunction --exception-handling -rp=. --project=cmake.output.notest_nocli_nogui/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr
172+
env:
173+
DISABLE_VALUEFLOW: 1
174+
UNUSEDFUNCTION_ONLY: 1
175+
# unusedFunction notest nocli nogui - end
176+
157177
- name: Fetch corpus
158178
run: |
159179
wget https://github.com/danmar/cppcheck/archive/refs/tags/2.8.tar.gz

0 commit comments

Comments
 (0)