diff --git a/demo/.shellcheckrc b/demo/.shellcheckrc new file mode 100644 index 0000000..b988374 --- /dev/null +++ b/demo/.shellcheckrc @@ -0,0 +1,5 @@ +# ShellCheck configuration for the TSYS Developer Support Stack +# These rules are inherent to the environment-driven (dynamic source) design: +# SC1090 - can't follow non-constant source (e.g. `source "$ENV_FILE"`) +# SC1091 - not following external file specified as input (demo.env) +disable=SC1090,SC1091 diff --git a/demo/scripts/demo-test.sh b/demo/scripts/demo-test.sh index a9ee803..68f8e19 100755 --- a/demo/scripts/demo-test.sh +++ b/demo/scripts/demo-test.sh @@ -74,7 +74,7 @@ test_service_health() { log_test "Service health" local unhealthy=0 while IFS= read -r line; do - local name status + local name name=$(echo "$line" | awk '{print $1}') [[ "$name" == "NAMES" || -z "$name" ]] && continue if echo "$line" | grep -q "(healthy)"; then diff --git a/demo/scripts/validate-all.sh b/demo/scripts/validate-all.sh index e74e400..1b88003 100755 --- a/demo/scripts/validate-all.sh +++ b/demo/scripts/validate-all.sh @@ -17,8 +17,8 @@ BLUE='\033[0;34m' NC='\033[0m' log_validation() { echo -e "${BLUE}[VALIDATE]${NC} $1"; } -log_pass() { echo -e "${GREEN}[PASS]${NC} $1"; ((VALIDATION_PASSED++)); } -log_fail() { echo -e "${RED}[FAIL]${NC} $1"; ((VALIDATION_FAILED++)); } +log_pass() { echo -e "${GREEN}[PASS]${NC} $1"; VALIDATION_PASSED=$((VALIDATION_PASSED + 1)); } +log_fail() { echo -e "${RED}[FAIL]${NC} $1"; VALIDATION_FAILED=$((VALIDATION_FAILED + 1)); } validate_yaml_files() { log_validation "Validating YAML files with yamllint..."