Excluded static analysis tests

This commit is contained in:
Bob Mottram 2018-03-03 09:55:51 +00:00
parent 9801333767
commit 6e84c5fdac
1 changed files with 5 additions and 3 deletions

View File

@ -70,11 +70,13 @@ function test_static_analysis {
apt-get -yq install shellcheck apt-get -yq install shellcheck
fi fi
STATIC_ANALYSIS_EXCLUDED='SC2034,SC1090'
FILES="/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-*" FILES="/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-*"
for filename in $FILES for filename in $FILES
do do
if ! shellcheck --exclude SC2034,SC1090 "$filename"; then if ! shellcheck --exclude "$STATIC_ANALYSIS_EXCLUDED" "$filename"; then
echo '' echo ''
echo $"${filename} failed static analysis" echo $"${filename} failed static analysis"
exit 24687242 exit 24687242
@ -85,7 +87,7 @@ function test_static_analysis {
for filename in $FILES for filename in $FILES
do do
if ! shellcheck --exclude SC2034,SC1090 "$filename"; then if ! shellcheck --exclude "$STATIC_ANALYSIS_EXCLUDED" "$filename"; then
echo '' echo ''
echo $"${filename} failed static analysis" echo $"${filename} failed static analysis"
exit 3857395935 exit 3857395935
@ -100,7 +102,7 @@ function test_static_analysis {
continue continue
fi fi
if ! shellcheck --exclude SC2034,SC1090 "$filename"; then if ! shellcheck --exclude "$STATIC_ANALYSIS_EXCLUDED" "$filename"; then
echo '' echo ''
echo $"${filename} failed static analysis" echo $"${filename} failed static analysis"
exit 784243468435 exit 784243468435