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