travis,tests: run cppcheck only if it exists

ugh... seems cppcheck is not packaged for OS X
And `set -e` exposes this.

And also `cppcheck` seems to exit with non-zero
exit codes by default [even if errs found].

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
Alexandru Ardelean
2017-07-10 17:47:00 +03:00
parent 9d47ae824c
commit effab3f91a

View File

@@ -29,4 +29,4 @@ script:
after_success:
- make check
- cppcheck --quiet *.h *.c tests/
- if type cppcheck &> /dev/null ; then cppcheck --error-exitcode=1 --quiet *.h *.c tests/ ; fi