From 6a77b21f9c64e5f13403f792e6b5796a1f5c7010 Mon Sep 17 00:00:00 2001 From: anh Date: Fri, 13 Dec 2019 06:48:04 -0500 Subject: [PATCH] issue #427, adding travis.yml for cppcheck on flight --- .travis.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..0ba5ca300 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +dist: bionic +sudo: required +language: + - c +compiler: + - gcc +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - cmake + +before_install: + - sudo apt-get install cppcheck + +script: + # Check versions + - cppcheck --version + + #cppcheck flight software cfe/fsw/cfe-core/src + - cppcheck --force --inline-suppr --std=c99 --language=c --error-exitcode=1 --enable=warning,performance,portability,style --suppress=variableScope --inconclusive fsw/cfe-core/src 2>cppcheck_flight_cfe.txt + - | + if [[ -s cppcheck_flight_cfe.txt ]]; then + echo "You must fix cppcheck errors before submitting a pull request" + echo "" + cat cppcheck_flight_cfe.txt + exit -1 + fi +