]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
travis,tests: run cppcheck only if it exists
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Mon, 10 Jul 2017 14:47:00 +0000 (17:47 +0300)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Thu, 13 Jul 2017 06:05:13 +0000 (09:05 +0300)
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>
.travis.yml

index 7aed15dafdb9fa2ccc4a4717942a910d93bb8ce9..1471983e91b7d6539a6433719d63187b7e6d04f1 100644 (file)
@@ -29,4 +29,4 @@ script:
 \r
 after_success:\r
   - make check\r
-  - cppcheck --quiet *.h *.c tests/\r
+  - if type cppcheck &> /dev/null ; then cppcheck --error-exitcode=1 --quiet *.h *.c tests/ ; fi\r