diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2020-05-12 21:50:08 +0200 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2020-05-27 20:33:49 +0200 |
commit | e4262a282e87667de583956c68063630b3943b5e (patch) | |
tree | 8098f7142edb9a651dc64cfd077bd9f60f851c0d /.travis.sh | |
parent | d83fc3afd5e37d969d5b634a7b9b12ebec4428ee (diff) | |
download | libexpat-git-e4262a282e87667de583956c68063630b3943b5e.tar.gz |
Travis: Improve call to cppcheck
This adds:
- argument --force
- blacklists .c files that are ment to be included, only
- printing the version of cppcheck
Diffstat (limited to '.travis.sh')
-rwxr-xr-x | .travis.sh | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -60,7 +60,19 @@ elif [[ ${MODE} = cmake-oos ]]; then make DESTDIR="${PWD}"/ROOT install find ROOT -printf "%P\n" | sort elif [[ ${MODE} = cppcheck ]]; then - cppcheck --quiet --error-exitcode=1 . + cppcheck --version + find_args=( + -type f \( + -name \*.cpp + -o -name \*.c + \) + -not \( # Exclude .c files that are merely included by other files + -name xmltok_ns.c + -o -name xmltok_impl.c + \) + -exec cppcheck --quiet --error-exitcode=1 --force {} + + ) + find "${find_args[@]}" elif [[ ${MODE} = clang-format ]]; then ./apply-clang-format.sh git diff --exit-code |