8000 lintcmd: parse final build config at EOF by dajiaohuang · Pull Request #1757 · dominikh/go-tools · GitHub
[go: up one dir, main page]

Skip to content

lintcmd: parse final build config at EOF - #1757

Open
dajiaohuang wants to merge 2 commits into
dominikh:masterfrom
dajiaohuang:fix/lintcmd-build-config-eof
Open

dajiaohuang wants to merge 2 commits into
dominikh:masterfrom
dajiaohuang:fix/lintcmd-build-config-eof

Conversation

@dajiaohuang
@dajiaohuang dajiaohuang commented Oct 1, 2026 •
Copy link
Copy Markdown

parseBuildConfigs discarded the final record whenever ReadString returned its bytes together with io.EOF. It also counted only successfully parsed nonblank configs when reporting error line numbers. Process any returned bytes before handling EOF, and track physical input lines. Regression tests cover an unterminated final record and a parse error after a blank line.

Validation: go test ./lintcmd passed.

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

0