Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SA1019: don't flag deprecated object from standard library if we don't know about it #1108

Closed
dominikh opened this issue Oct 27, 2021 · 0 comments

Comments

@dominikh
Copy link
Owner

Staticcheck maintains a mapping of deprecated objects in the Go standard library to when they've been deprecated and when alternatives became available. If code uses a deprecated object that became deprecated in Go 1.6, but the user is targeting Go 1.5 as the minimum version, and no alternative existed in 1.5 yet, then we won't flag it.

The current fallback behavior is that if we don't know about an object, we'll flag it. This causes problems for people who use Go tip, because there is a window where a new object becomes deprecated and we haven't updated our list yet, leading to false positives.

This leads to situations like golang/go#48665.

@dominikh dominikh added the started Issues we've started working on label Nov 6, 2021
@dominikh dominikh removed the started Issues we've started working on label Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant