From f3996b2884bbc3b0fa36c71dc5e6c6cbce4db8e5 Mon Sep 17 00:00:00 2001 From: Patrick Bertsch Date: Mon, 31 Aug 2026 16:53:41 -0600 Subject: [PATCH] fix: collapse tautological err check on lexBarePlaceholder (FP-11) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- internal/parser/lexer.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/parser/lexer.go b/internal/parser/lexer.go index f207e09..f741527 100644 --- a/internal/parser/lexer.go +++ b/internal/parser/lexer.go @@ -100,9 +100,10 @@ func (l *Lexer) nextLine() error { return err } case ch == '<': - if err := l.lexBarePlaceholder(); err != nil { - return err - } + // lexBarePlaceholder has no success path — an unquoted '<' is + // always a parse error (see its doc comment) — so there's + // nothing to fall through to here. + return l.lexBarePlaceholder() case ch == ':': l.emit(TOKEN_COLON, ":") l.pos++