build: run ShellCheck in CI (#31809)

build: run ShellCheck

Adds a ShellCheck check to edx-platform PRs and master,
using the shared workflow & template from the .github repo.
This will become a "required" check once it passes for 2 straight weeks on master.

Brings all existing shell scripts into compliance with ShellCheck.
This commit is contained in:
Kyle McCormick
2023-03-10 11:10:56 -05:00
committed by GitHub
parent 7f769b4755
commit cd24534653
7 changed files with 73 additions and 32 deletions

View File

@@ -13,13 +13,13 @@ set -e
# Violations thresholds for failing the build
source scripts/thresholds.sh
XSSLINT_THRESHOLDS=`cat scripts/xsslint_thresholds.json`
XSSLINT_THRESHOLDS=$(cat scripts/xsslint_thresholds.json)
export XSSLINT_THRESHOLDS=${XSSLINT_THRESHOLDS//[[:space:]]/}
# Run appropriate CI system script
if [ -n "$SCRIPT_TO_RUN" ] ; then
$SCRIPT_TO_RUN
# Run appropriate CI system script (with args if provided)
if [ -n "${SCRIPT_TO_RUN[*]}" ] ; then
"${SCRIPT_TO_RUN[@]}"
# Exit with the exit code of the called script
exit $?