瀏覽代碼

Merge pull request #591 from Pro/feature/scan_build_amalgamation

Add static analysis with amalgamation enabled
Sten Grüner 9 年之前
父節點
當前提交
77cc480499
共有 1 個文件被更改,包括 10 次插入0 次删除
  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 \