From e9cfa4105cf5718a4bbfcb06adc737437d9bd3fa Mon Sep 17 00:00:00 2001 From: Vratislav Podzimek Date: Thu, 12 Sep 2024 16:42:00 +0200 Subject: [PATCH] Workaround cppcheck ignoring `-i libpromises/cf3lex.c` When running cppcheck in static checks, we use `-i libpromises/cf3lex.c` in order to make cppcheck ignore the generated cf3lex.c file. However, the new version of cppcheck ignores this option and fails on issues found in the file. However, we don't want this file or any other generated files except for bootstrap.inc which contains the bootstrap policy. So we can run `make clean` and `make -C libpromise/ boostrap.inc` before running cppcheck to get a cleaner environment. --- tests/static-check/run_checks.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/static-check/run_checks.sh b/tests/static-check/run_checks.sh index c5cd3120d5..5b5fcce3df 100755 --- a/tests/static-check/run_checks.sh +++ b/tests/static-check/run_checks.sh @@ -21,6 +21,8 @@ function check_with_clang() { function check_with_cppcheck() { rm -f config.cache + make clean + make -C libpromises/ bootstrap.inc # needed by libpromises/bootstrap.c ./configure -C --enable-debug # cppcheck options: