8000 SA1019: detect deprecated dot-imported objects by dajiaohuang · Pull Request #1825 · dominikh/go-tools · GitHub
[go: up one dir, main page]

Skip to content

SA1019: detect deprecated dot-imported objects - #1825

Open
dajiaohuang wants to merge 2 commits into
dominikh:masterfrom
dajiaohuang:fix/sa1019-dot-import
Open

dajiaohuang wants to merge 2 commits into
dominikh:masterfrom
dajiaohuang:fix/sa1019-dot-import

Conversation

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

SA1019 checks deprecated objects referenced through dot imports, including function references, while preserving qualified selector diagnostics.

Struct literal field keys are handled once by the existing synthetic selector path. The review follow-up corrects the ancestor-stack index so the added identifier traversal does not emit a second, incorrectly named diagnostic for these keys. Added dot-import function and struct-field regression coverage.

Validation: the previous PR head failed the existing Go 1.0 fixture with unexpected pkg.D diagnostics; after the ancestor fix, go test ./staticcheck/sa1019 passed all 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