diff --git a/src/freedombone-tests b/src/freedombone-tests index 04370b07..37443af4 100755 --- a/src/freedombone-tests +++ b/src/freedombone-tests @@ -65,6 +65,30 @@ function test_app_function_type { fi } +function test_static_analysis { + FILES="/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-*" + + for filename in $FILES + do + if ! shellcheck --exclude SC2034,SC1090 "$filename"; then + echo '' + echo $"${filename} failed static analysis" + exit 24687242 + fi + done + + FILES="/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-*" + + for filename in $FILES + do + if ! shellcheck --exclude SC2034,SC1090 "$filename"; then + echo '' + echo $"${filename} failed static analysis" + exit 24687242 + fi + done +} + function test_app_functions { if [ $RUN_STIG ]; then return @@ -1255,6 +1279,7 @@ if [ ! "$RUN_STIG" ]; then fi test_app_functions +test_static_analysis test_unique_onion_ports remove_management_engine_interface freedombone-pass --test yes