Files
proxmox/scripts/verify/run-shellcheck.sh
defiQUG b3a8fe4496
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
chore: sync all changes to Gitea
- Config, docs, scripts, and backup manifests
- Submodule refs unchanged (m = modified content in submodules)

Made-with: Cursor
2026-03-02 11:37:34 -08:00

27 lines
893 B
Bash

#!/usr/bin/env bash
# Run shellcheck on verification scripts (optional — requires shellcheck to be installed).
# Usage: bash scripts/verify/run-shellcheck.sh [--optional]
# --optional: exit 0 if shellcheck not installed; and do not fail the run on findings (report only).
# Install: apt install shellcheck (or brew install shellcheck)
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
OPTIONAL=false
[[ "${1:-}" == "--optional" ]] && OPTIONAL=true
if ! command -v shellcheck &>/dev/null; then
echo "shellcheck not found. Install with: apt install shellcheck (or brew install shellcheck)"
[[ "$OPTIONAL" == true ]] && exit 0 || exit 1
fi
echo "Running shellcheck on scripts/verify/*.sh..."
if [[ "$OPTIONAL" == true ]]; then
shellcheck -x ./*.sh || true
echo "Done (optional: exit 0)."
exit 0
fi
shellcheck -x ./*.sh
echo "Done."