Skip to content

Commit

Permalink
Enforc strict cppcheck in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
skliper committed Dec 6, 2019
1 parent 35ec257 commit 1fe6e51
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,17 @@ script:
- cp cfe/cmake/Makefile.sample Makefile
- cp -r cfe/cmake/sample_defs sample_defs
# Static code analysis
- cppcheck --force --inline-suppr .
# Below is intent but fails - exit code bug in cppcheck 1.82
# - cppcheck --force --inline-suppr --quiet --error-exitcode=1 .
# Work around script:
- cppcheck --force --inline-suppr --quiet . 2> cppcheck_err.txt
- |
if [[ -s cppcheck_err.txt ]]; then
echo "You must fix cppcheck errors before submitting a pull request"
echo ""
cat cppcheck_err.txt
exit -1
fi
# Prep and build
- make prep
- make
Expand Down

0 comments on commit 1fe6e51

Please sign in to comment.