Skip to content

chore: the lexer's builder writes discard what cannot fail - #23

Merged
christiangda merged 1 commit into
mainfrom
chore/the-lexers-builder-writes
Oct 18, 2026
Merged

christiangda merged 1 commit into
mainfrom
chore/the-lexers-builder-writes

Conversation

@christiangda

Copy link
Copy Markdown
Contributor

What

golangci-lint run reported three errcheck findings in filter_lexer.go: the strings.Builder writes of the single-quoted string literal loop were unchecked.

How

A strings.Builder's writes never return an error, so the error is discarded on purpose (_, _ =), with a comment saying so; the two quotes an escaped quote is kept as are one WriteString("''"). Nothing the lexer produces changes.

Verified locally

  • golangci-lint run ./...: 0 issues (was 3).
  • go vet ./... clean; go test -race -tags=unit ./... passes.
  • Coverage gate (.testcoverage.yml): 97.5%, thresholds satisfied.

🤖 Generated with Claude Code

golangci-lint's errcheck reported three unchecked strings.Builder writes in
the single-quoted string literal loop. A strings.Builder's writes never
return an error; the error is discarded on purpose, and the two quotes of
an escaped quote are one write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@christiangda christiangda self-assigned this Oct 18, 2026
@christiangda
christiangda merged commit d9faac2 into main Oct 18, 2026
1 check passed
@christiangda
christiangda deleted the chore/the-lexers-builder-writes branch October 18, 2026 08:54
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