8000 stylecheck: preserve HTTP import aliases in ST1013 fixes by dajiaohuang · Pull Request #1759 · dominikh/go-tools · GitHub
[go: up one dir, main page]

Skip to content

stylecheck: preserve HTTP import aliases in ST1013 fixes - #1759

Open
dajiaohuang wants to merge 1 commit into
dominikh:masterfrom
dajiaohuang:fix/st1013-import-alias-fixes
Open

dajiaohuang wants to merge 1 commit into
dominikh:masterfrom
dajiaohuang:fix/st1013-import-alias-fixes

Conversation

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

ST1013 matched calls by the imported net/http symbol but always emitted a suggested replacement qualified with http. That edit is undefined when the source imports net/http under an alias. Build the replacement from the selector's existing package identifier and add an aliased-import regression fixture. Calls without a selector package identifier keep the diagnostic without an invalid fix.

Validation: go test ./stylecheck/st1013 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

2BAF
0