1#!/bin/bash 2set -e 3 4SCRIPTPATH="$( 5 cd "$(dirname "$0")" 6 pwd -P 7)" 8cd $SCRIPTPATH 9 10if [ ! -d ./build ]; then 11 mkdir ./build 12fi 13 14cd ./build 15cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release \ 16 && make 17pvs-studio-analyzer analyze -a 45 -l ${HOME}/.config/PVS-Studio/PVS-Studio.lic -j4 -o ./pvs.log 18rm -rf ./pvs_report 19plog-converter -a 'GA:1,2,3;64:1;OP:1,2,3;MISRA:1' -t fullhtml -o ./pvs_report ./pvs.log 20