summaryrefslogtreecommitdiff
path: root/.travis.sh
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2020-05-12 21:50:08 +0200
committerSebastian Pipping <sebastian@pipping.org>2020-05-27 20:33:49 +0200
commite4262a282e87667de583956c68063630b3943b5e (patch)
tree8098f7142edb9a651dc64cfd077bd9f60f851c0d /.travis.sh
parentd83fc3afd5e37d969d5b634a7b9b12ebec4428ee (diff)
downloadlibexpat-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.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/.travis.sh b/.travis.sh
index bcf6c089..3da8d6a8 100755
--- a/.travis.sh
+++ b/.travis.sh
@@ -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