Skip to content

Commit e609cd4

Browse files
committed
no-mistakes(lint): Fix attention lint warnings
1 parent 6faae6b commit e609cd4

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

bin/fm-attention-lib.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ _fm_attention_generation_set() { # <generation-set> <key> <generation>
224224
# origin_open_decisions skips them.
225225
fm_attention_status_rows() { # <state-dir>
226226
local state=$1 meta id status kind last verb key note n next line stripped pause resolve held
227-
local decisions waits decision_gens wait_gens existing gen old_key old_verb old_gen old_n old_note
227+
local decisions waits decision_gens wait_gens existing gen
228228
pause=${FM_CLASSIFY_PAUSED_VERB:-$FM_CLASSIFY_PAUSED_VERB_DEFAULT}
229229
resolve=${FM_CLASSIFY_RESOLVE_VERB:-$FM_CLASSIFY_RESOLVE_VERB_DEFAULT}
230230
held=${FM_CLASSIFY_CAPTAIN_HELD_VERB:-$FM_CLASSIFY_CAPTAIN_HELD_VERB_DEFAULT}
@@ -254,7 +254,7 @@ fm_attention_status_rows() { # <state-dir>
254254
needs-decision|blocked)
255255
existing=$(_fm_attention_row_for_key "$decisions" "$key" || true)
256256
if [ -n "$existing" ]; then
257-
IFS=$'\t' read -r old_key old_verb gen old_note <<EOF
257+
IFS=$'\t' read -r _ _ gen _ <<EOF
258258
$existing
259259
EOF
260260
else
@@ -281,7 +281,7 @@ EOF
281281
"$pause")
282282
existing=$(_fm_attention_row_for_key "$waits" "$key" || true)
283283
if [ -n "$existing" ]; then
284-
IFS=$'\t' read -r old_key old_verb gen n old_note <<EOF
284+
IFS=$'\t' read -r _ _ gen n _ <<EOF
285285
$existing
286286
EOF
287287
n=$((n + 1))
@@ -541,7 +541,9 @@ fm_attention_status() { # <fm-home>
541541
dec_ids=$(printf '%s\n' "$summary" | awk '/^--decisions--$/{s=1;next} s')
542542
else
543543
FM_ATT_AVAILABLE=false
544+
# shellcheck disable=SC2034 # Read by callers after sourcing.
544545
FM_ATT_UNKNOWN=true
546+
# shellcheck disable=SC2034 # Read by callers after sourcing.
545547
FM_ATT_ERROR='The open decision and wait list could not be determined.'
546548
FM_ATT_JSON='{"unknown":true}'
547549
FM_ATT_DIGEST=unknown
@@ -550,6 +552,7 @@ fm_attention_status() { # <fm-home>
550552
FM_ATT_NEW=true
551553
FM_ATT_DECISIONS_NEW=true
552554
seen_unknown=$(sed -n 's/^unknown=//p' "$state/.captain-attention-unknown" 2>/dev/null | tail -1 || true)
555+
# shellcheck disable=SC2034 # Read by callers after sourcing.
553556
[ "$FM_ATT_UNKNOWN_DIGEST" = "$seen_unknown" ] || FM_ATT_UNKNOWN_NEW=true
554557
return 0
555558
fi

tests/fm-attention.test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ add_row() { # <home> <section> <line>
8787
}
8888

8989
failing_snapshot() { # <home>
90-
local home=$1 bin="$home/bin/failing-snapshot"
90+
local home=$1
91+
local bin="$home/bin/failing-snapshot"
9192
printf '#!/usr/bin/env bash\nexit 42\n' > "$bin"
9293
chmod +x "$bin"
9394
printf '%s\n' "$bin"

0 commit comments

Comments
 (0)