fix: shellcheck TODO has no enforcement — || true may never be removed (#71)

- Fix SC2164: add || exit 1 to bare cd in update-prompt.sh
- Fix SC2155: separate declare and assign in env.sh, supervisor-poll.sh, dev-agent.sh
- Fix SC2034: inline suppression for vars used by sourced helpers
- Remove unused `mergeable` declaration, rename unused loop var to `_w`
- Remove || true from shellcheck CI step — failures are now blocking

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
openhands 2026-03-18 01:53:02 +00:00
parent 81e5e5aa50
commit bd02330b22
9 changed files with 20 additions and 9 deletions

View file

@ -82,7 +82,8 @@ matrix_send() {
[ -z "${MATRIX_TOKEN:-}" ] && return 0
local prefix="$1" msg="$2" thread_id="${3:-}" ctx_tag="${4:-}"
local room_encoded="${MATRIX_ROOM_ID//!/%21}"
local txn="$(date +%s%N)$$"
local txn
txn="$(date +%s%N)$$"
local body
if [ -n "$thread_id" ]; then
body=$(jq -nc --arg m "[${prefix}] ${msg}" --arg t "$thread_id" \

View file

@ -34,6 +34,7 @@ if [ -z "${MATRIX_TOKEN:-}" ] || [ -z "${MATRIX_ROOM_ID:-}" ]; then
fi
# URL-encode room ID
# shellcheck disable=SC2034
ROOM_ENCODED="${MATRIX_ROOM_ID//!/%21}"
# Build sync filter — only our room, only messages
@ -108,6 +109,7 @@ while true; do
while IFS= read -r event; do
SENDER=$(printf '%s' "$event" | jq -r '.sender')
BODY=$(printf '%s' "$event" | jq -r '.content.body // ""')
# shellcheck disable=SC2034
EVENT_ID=$(printf '%s' "$event" | jq -r '.event_id')
# Check if this is a thread reply