Add static analysis step
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
17
tools/static_analysis.sh
Executable file
17
tools/static_analysis.sh
Executable 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
|
||||
Reference in New Issue
Block a user