[segyio] 268/376: Add cppcheck step on travis

Jørgen Kvalsvik jokva-guest at moszumanska.debian.org
Wed Sep 20 08:04:43 UTC 2017


This is an automated email from the git hooks/post-receive script.

jokva-guest pushed a commit to branch debian
in repository segyio.

commit 369f0226cb76b1b2b4a6240292c6f5cadc23fedc
Author: Jørgen Kvalsvik <jokva at statoil.com>
Date:   Wed Mar 29 13:43:37 2017 +0200

    Add cppcheck step on travis
---
 .travis.yml | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index c70dd75..cb41244 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -23,8 +23,11 @@ matrix:
 
 addons:
     apt:
+      sources:
+        - sourceline: 'ppa:sisib/ci-backports'
       packages:
         - valgrind
+        - cppcheck
 
 install:
   # Valgrind is experimental(ish) on MacOS with false positives on among others printf
@@ -34,6 +37,7 @@ install:
   #  fi
   - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
       export CONDA_OS=MacOSX;
+      brew update && brew install cppcheck;
     else
       export CONDA_OS=Linux;
     fi
@@ -57,6 +61,15 @@ before_script:
   - cmake --version
   - mkdir build
   - pushd build
-  - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SHARED_LIBS=ON $enabled  ..
+  - cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SHARED_LIBS=ON $enabled  ..
+  - cppcheck --language=c
+             --std=c99
+             --enable=style,portability,performance,warning
+             --library=posix
+             --library=$TRAVIS_BUILD_DIR/cppcheck/segyio.cfg
+             --suppressions-list=$TRAVIS_BUILD_DIR/cppcheck/suppressions.txt
+             --inline-suppr
+             --project=compile_commands.json
+             --error-exitcode=1
 script:
   - make && ctest --output-on-failure

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/segyio.git



More information about the debian-science-commits mailing list