8000 simple: preserve time aliases in fixes by dajiaohuang · Pull Request #1760 · dominikh/go-tools · GitHub
[go: up one dir, main page]

Skip to content

simple: preserve time aliases in fixes - #1760

Open
dajiaohuang wants to merge 2 commits into
dominikh:masterfrom
dajiaohuang:fix/simple-time-import-alias-fixes
Open

dajiaohuang wants to merge 2 commits into
dominikh:masterfrom
dajiaohuang:fix/simple-time-import-alias-fixes

Conversation

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

S1012, S1024 and S1037 preserve the time package qualifier from the matched call when generating Since, Until and Sleep fixes. Aliased-import regression fixtures cover each check.

The review follow-up handles dot-imported calls without selector assertion panics or an invalid generated selector: diagnostics remain and unsafe fixes are omitted. S1037 now uses the exact time.After call matched by the pattern, so an unrelated nested After call cannot replace its package qualifier.

Added dot-import fixtures for all three checks and a nested unrelated After regression/golden fixture. Validation: go test ./simple/s1012 ./simple/s1024 ./simple/s1037 passed (seven tests); gofmt and git diff --check 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