Skip to content

fix: collapse tautological err check on lexBarePlaceholder (FP-11) - #267

Merged
pbertsch merged 1 commit into
mainfrom
FP11
Aug 31, 2026
Merged

fix: collapse tautological err check on lexBarePlaceholder (FP-11)#267
pbertsch merged 1 commit into
mainfrom
FP11

Conversation

@pbertsch

Copy link
Copy Markdown
Member

Summary

  • Jira: FP-11
  • Fixes the pre-existing, unrelated staticcheck failure that was blocking the required "Lint" check on main (surfaced and confirmed unrelated while merging fix: tap no longer bypasses occlusion via the direct-invoke fast path (FP-10) #266/FP-10).
  • lexBarePlaceholder (internal/parser/lexer.go:149) has no return-nil path — an unquoted < is always a parse error by design (see PT-02(b)'s doc comment on that function). staticcheck's SA4023 correctly flagged the call site's if err := l.lexBarePlaceholder(); err != nil as an always-true comparison, plus a "never returns nil" hint.
  • Collapsed to return l.lexBarePlaceholder() — behaviorally identical, since err was always non-nil anyway; just removes the now-provably-dead branch.

Test plan

  • staticcheck ./... — 0 issues (previously failed on this exact file/line)
  • go vet ./..., go build ./... — clean
  • go test ./... — full suite passes, including internal/parser lexer tests

lexBarePlaceholder has no return-nil path — an unquoted '<' is always
a parse error by design (PT-02(b)) — so `if err := ...; err != nil`
at the call site was flagged by staticcheck (SA4023: always-true
comparison) as pre-existing tech debt blocking the required Lint CI
check on main (confirmed unrelated to FP-10/#265/#266).

Collapses to a direct `return l.lexBarePlaceholder()` — behaviorally
identical, since err was always non-nil anyway.
@pbertsch
pbertsch requested a review from a team as a code owner August 31, 2026 22:53
@pbertsch
pbertsch added this pull request to the merge queue Aug 31, 2026
Merged via the queue into main with commit 3fd52eb Aug 31, 2026
15 checks passed
@pbertsch
pbertsch deleted the FP11 branch August 31, 2026 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant