mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-15 00:38:15 +00:00
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:
parent
d83fc3afd5
commit
e4262a282e
1 changed files with 13 additions and 1 deletions
14
.travis.sh
14
.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
|
||||
|
|
Loading…
Add table
Reference in a new issue