diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-07-17 01:18:04 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-07-22 02:34:30 +0000 |
commit | f627a26a7b1c3619ba66f84b87092ff8ba7a95b6 (patch) | |
tree | c72c950fab473dc9bec4b5329d251b790e55443d /.travis | |
parent | 7245ac11ef9be2420c8356c12acc79f93ea211bb (diff) |
Run Clang global static analysis on Travis.
This uses a single .cc file containing almost all the code in the
repository to perform whole program analysis.
Diffstat (limited to '.travis')
-rwxr-xr-x | .travis/cmake-linux | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.travis/cmake-linux b/.travis/cmake-linux index 48b72925..bbfb7a96 100755 --- a/.travis/cmake-linux +++ b/.travis/cmake-linux | |||
@@ -37,6 +37,13 @@ travis_install() { | |||
37 | } | 37 | } |
38 | } | 38 | } |
39 | 39 | ||
40 | run_static_analysis() { | ||
41 | export CPPFLAGS="-isystem $CACHEDIR/include" | ||
42 | export LDFLAGS="-L $CACHEDIR/lib" | ||
43 | other/analysis/run-clang | ||
44 | other/analysis/run-clang-analyze | ||
45 | } | ||
46 | |||
40 | travis_script() { | 47 | travis_script() { |
41 | . ".travis/flags-$CC.sh" | 48 | . ".travis/flags-$CC.sh" |
42 | 49 | ||
@@ -50,6 +57,9 @@ travis_script() { | |||
50 | 57 | ||
51 | other/astyle/format-source . "$ASTYLE" | 58 | other/astyle/format-source . "$ASTYLE" |
52 | 59 | ||
60 | # Use () to run in a separate process so the exports are local. | ||
61 | (run_static_analysis) | ||
62 | |||
53 | cmake -B_build -H. \ | 63 | cmake -B_build -H. \ |
54 | -DCMAKE_C_FLAGS="$C_FLAGS" \ | 64 | -DCMAKE_C_FLAGS="$C_FLAGS" \ |
55 | -DCMAKE_CXX_FLAGS="$CXX_FLAGS" \ | 65 | -DCMAKE_CXX_FLAGS="$CXX_FLAGS" \ |