@@ -16,7 +16,6 @@ permissions:
1616 contents : read
1717
1818jobs :
19- # TODO: enable information
2019 build :
2120
2221 runs-on : ubuntu-22.04
@@ -77,11 +76,10 @@ jobs:
7776 # make sure the auto-generated GUI dependencies exist
7877 make -C cmake.output gui-build-deps
7978
80- # TODO: find a way to report unmatched suppressions without need to add information checks
8179 - name : Self check (unusedFunction)
8280 if : false # TODO: fails with preprocessorErrorDirective - see #10667
8381 run : |
84- ./cppcheck -q --template=selfcheck --error-exitcode=1 --library=cppcheck-lib --library=qt -D__CPPCHECK__ -D__GNUC__ -DQT_VERSION=0x060000 -DQ_MOC_OUTPUT_REVISION=69 -DQT_CHARTS_LIB -DQT_MOC_HAS_STRINGDATA --enable=unusedFunction --exception-handling -rp=. --project=cmake.output/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr
82+ ./cppcheck -q --template=selfcheck --error-exitcode=1 --library=cppcheck-lib --library=qt -D__CPPCHECK__ -D__GNUC__ -DQT_VERSION=0x060000 -DQ_MOC_OUTPUT_REVISION=69 -DQT_CHARTS_LIB -DQT_MOC_HAS_STRINGDATA --enable=unusedFunction,information --exception-handling -rp=. --project=cmake.output/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr
8583 env :
8684 DISABLE_VALUEFLOW : 1
8785 UNUSEDFUNCTION_ONLY : 1
@@ -103,10 +101,9 @@ jobs:
103101 # make sure the auto-generated GUI dependencies exist
104102 make -C cmake.output.notest gui-build-deps
105103
106- # TODO: find a way to report unmatched suppressions without need to add information checks
107104 - name : Self check (unusedFunction / no test)
108105 run : |
109- ./cppcheck -q --template=selfcheck --error-exitcode=1 --library=cppcheck-lib --library=qt -D__CPPCHECK__ -D__GNUC__ -DQT_VERSION=0x060000 -DQ_MOC_OUTPUT_REVISION=69 -DQT_CHARTS_LIB -DQT_MOC_HAS_STRINGDATA --enable=unusedFunction --exception-handling -rp=. --project=cmake.output.notest/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr
106+ ./cppcheck -q --template=selfcheck --error-exitcode=1 --library=cppcheck-lib --library=qt -D__CPPCHECK__ -D__GNUC__ -DQT_VERSION=0x060000 -DQ_MOC_OUTPUT_REVISION=69 -DQT_CHARTS_LIB -DQT_MOC_HAS_STRINGDATA --enable=unusedFunction,information --exception-handling -rp=. --project=cmake.output.notest/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr
110107 env :
111108 DISABLE_VALUEFLOW : 1
112109 UNUSEDFUNCTION_ONLY : 1
@@ -122,10 +119,10 @@ jobs:
122119 # make sure the precompiled headers exist
123120 make -C cmake.output.notest_nogui lib/CMakeFiles/cppcheck-core.dir/cmake_pch.hxx.cxx
124121
125- # TODO: find a way to report unmatched suppressions without need to add information checks
126122 - name : Self check (unusedFunction / no test / no gui)
127123 run : |
128- ./cppcheck -q --template=selfcheck --error-exitcode=1 --library=cppcheck-lib -D__CPPCHECK__ -D__GNUC__ --enable=unusedFunction --exception-handling -rp=. --project=cmake.output.notest_nogui/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr
124+ supprs="--suppress=unusedFunction:lib/errorlogger.h:193 --suppress=unusedFunction:lib/importproject.cpp:1508 --suppress=unusedFunction:lib/importproject.cpp:1532"
125+ ./cppcheck -q --template=selfcheck --error-exitcode=1 --library=cppcheck-lib -D__CPPCHECK__ -D__GNUC__ --enable=unusedFunction,information --exception-handling -rp=. --project=cmake.output.notest_nogui/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr $supprs
129126 env :
130127 DISABLE_VALUEFLOW : 1
131128 UNUSEDFUNCTION_ONLY : 1
@@ -145,11 +142,10 @@ jobs:
145142 # make sure the auto-generated GUI dependencies exist
146143 make -C cmake.output.notest_nocli gui-build-deps
147144
148- # TODO: find a way to report unmatched suppressions without need to add information checks
149145 - name : Self check (unusedFunction / no test / no cli)
150146 if : false # TODO: the findings are currently too intrusive
151147 run : |
152- ./cppcheck -q --template=selfcheck --error-exitcode=1 --library=cppcheck-lib --library=qt -D__CPPCHECK__ -D__GNUC__ -DQT_VERSION=0x060000 -DQ_MOC_OUTPUT_REVISION=69 -DQT_CHARTS_LIB -DQT_MOC_HAS_STRINGDATA --enable=unusedFunction --exception-handling -rp=. --project=cmake.output.notest_nocli/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr
148+ ./cppcheck -q --template=selfcheck --error-exitcode=1 --library=cppcheck-lib --library=qt -D__CPPCHECK__ -D__GNUC__ -DQT_VERSION=0x060000 -DQ_MOC_OUTPUT_REVISION=69 -DQT_CHARTS_LIB -DQT_MOC_HAS_STRINGDATA --enable=unusedFunction,information --exception-handling -rp=. --project=cmake.output.notest_nocli/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr
153149 env :
154150 DISABLE_VALUEFLOW : 1
155151 UNUSEDFUNCTION_ONLY : 1
@@ -165,11 +161,10 @@ jobs:
165161 # make sure the precompiled headers exist
166162 make -C cmake.output.notest_nocli_nogui lib/CMakeFiles/cppcheck-core.dir/cmake_pch.hxx.cxx
167163
168- # TODO: find a way to report unmatched suppressions without need to add information checks
169164 - name : Self check (unusedFunction / no test / no cli / no gui)
170165 if : false # TODO: the findings are currently too intrusive
171166 run : |
172- ./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
167+ ./cppcheck -q --template=selfcheck --error-exitcode=1 --library=cppcheck-lib --library=qt -D__CPPCHECK__ -D__GNUC__ --enable=unusedFunction,information --exception-handling -rp=. --project=cmake.output.notest_nocli_nogui/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr
173168 env :
174169 DISABLE_VALUEFLOW : 1
175170 UNUSEDFUNCTION_ONLY : 1
@@ -193,11 +188,10 @@ jobs:
193188 # make sure the auto-generated GUI dependencies exist
194189 make -C cmake.output.corpus gui-build-deps
195190
196- # TODO: find a way to report unmatched suppressions without need to add information checks
197191 - name : Self check (unusedFunction / corpus / no test / callgrind)
198192 run : |
199193 # TODO: fix -rp so the suppressions actually work
200- valgrind --tool=callgrind ./cppcheck --template=selfcheck --error-exitcode=0 --library=cppcheck-lib --library=qt -D__GNUC__ -DQT_VERSION=0x060000 -DQ_MOC_OUTPUT_REVISION=69 -DQT_CHARTS_LIB -DQT_MOC_HAS_STRINGDATA --enable=unusedFunction --exception-handling -rp=. --project=cmake.output.corpus/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr 2>callgrind.log || (cat callgrind.log && false)
194+ valgrind --tool=callgrind ./cppcheck --template=selfcheck --error-exitcode=0 --library=cppcheck-lib --library=qt -D__GNUC__ -DQT_VERSION=0x060000 -DQ_MOC_OUTPUT_REVISION=69 -DQT_CHARTS_LIB -DQT_MOC_HAS_STRINGDATA --enable=unusedFunction,information --exception-handling -rp=. --project=cmake.output.corpus/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr 2>callgrind.log || (cat callgrind.log && false)
201195 cat callgrind.log
202196 callgrind_annotate --auto=no > callgrind.annotated.log
203197 head -50 callgrind.annotated.log
0 commit comments