Travis: Improve call to cppcheck

This adds:
- argument --force
- blacklists .c files that are ment to be included, only
- printing the version of cppcheck
This commit is contained in:
Sebastian Pipping 2020-05-12 21:50:08 +02:00
parent d83fc3afd5
commit e4262a282e

View file

@ -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