Index: build/build.sh =================================================================== diff -u -rb0624816aafba0cfabdac9884072b9d84273fb63 -r61128da21dad201e1357cbc0e1b898db674384b7 --- build/build.sh (.../build.sh) (revision b0624816aafba0cfabdac9884072b9d84273fb63) +++ build/build.sh (.../build.sh) (revision 61128da21dad201e1357cbc0e1b898db674384b7) @@ -40,20 +40,6 @@ echo } -#cppcheck runner for static code analysis -function cppcheck() { - cppcheck application -v \ - -Iapplication/sources \ - -Iapplication/sources/gui \ - -Iapplication/sources/storage \ - -Iapplication/sources/configuration \ - -Iapplication/sources/canbus \ - --enable=all \ - --check-config \ - 1> cppcheck.log \ - 2> cppcheck.err -} - #check if the out folders already exists if [[ -e $out_path ]]; then rm -frd $out_path @@ -77,8 +63,22 @@ cd $out_path # run the cppcheck -cppcheck +app_path=../$pro_path +cppcheck $app -v \ + -I$app_path/sources \ + -I$app_path/sources/gui \ + -I$app_path/sources/storage \ + -I$app_path/sources/configuration \ + -I$app_path/sources/canbus \ + --enable=all \ + 1> cppcheck.log \ + 2> cppcheck.err +if [[ $(grep \(error\) cppcheck.err) != "" ]]; then + echo "Static code analysis failed" + exit 1 +fi + # disabled gcc_64 build for now # since need to figure out how to install Qt without GUI on server # #build for gcc