Files
domo-iot/tools/static_analysis.sh
NADAL Jean-Baptiste e5bd19f12d update domo
2019-11-14 15:15:31 +01:00

18 lines
493 B
Bash
Executable File

#!/usr/bin/env bash
BUILD_DIR=$1
analyse_file () {
DIRNAME=`dirname $1`
echo "Analyse directory: $DIRNAME"
cd $DIRNAME
pvs-studio-analyzer analyze -o analyse.log --compiler gcc --compiler g++
plog-converter -a GA:1,2 -t tasklist -o report.tasks analyse.log
echo -e "\n**********************************\n"
cat report.tasks
echo -e "\n**********************************\n"
}
# Main
find ${BUILD_DIR} -name compile_commands.json | while read file; do analyse_file $file; done