Browse Source

Merge pull request #591 from Pro/feature/scan_build_amalgamation

Add static analysis with amalgamation enabled
Sten Grüner 9 years ago
parent
commit
77cc480499
1 changed files with 10 additions and 0 deletions
  1. 10 0
      tools/travis/travis_linux_script.sh

+ 10 - 0
tools/travis/travis_linux_script.sh

@@ -11,6 +11,16 @@ if [ $ANALYZE = "true" ]; then
           -enable-checker security.insecureAPI.UncheckedReturn \
           --status-bugs -v \
           make -j 8
+		cd .. && rm build -rf
+
+		mkdir -p build
+		cd build
+        scan-build cmake -G "Unix Makefiles" -DUA_ENABLE_AMALGAMATION=ON ..
+        scan-build -enable-checker security.FloatLoopCounter \
+          -enable-checker security.insecureAPI.UncheckedReturn \
+          --status-bugs -v \
+          make -j 8
+		cd .. && rm build -rf
     else
         cppcheck --template "{file}({line}): {severity} ({id}): {message}" \
             --enable=style --force --std=c++11 -j 8 \