Skip to content

Commit

Permalink
Workaround cppcheck ignoring -i libpromises/cf3lex.c
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vpodzime committed Sep 12, 2024
1 parent 4a442e6 commit e9cfa41
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/static-check/run_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e9cfa41

Please sign in to comment.