Add static analysis step
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
NADAL Jean-Baptiste
2020-01-22 10:19:58 +01:00
parent f1a4c5448b
commit 3c9f0c2f56
5 changed files with 47 additions and 11 deletions

17
tools/static_analysis.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/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