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

Indicate calls to Deprecated functions #2697

Closed
fedorareis opened this issue Mar 9, 2023 · 2 comments
Closed

Indicate calls to Deprecated functions #2697

fedorareis opened this issue Mar 9, 2023 · 2 comments

Comments

@fedorareis
Copy link

Is your feature request related to a problem? Please describe.
Visually indicate when a deprecated function is being used.

Describe the solution you'd like
Something similar to other editors (like GoLand) where strikethrough is put over the use of a deprecated function. It might be nice to allow users to customize how this is displayed, but I think starting with a strikethrough is a good starting point.

Describe alternatives you've considered
I don't think there are any good alternatives that make the use of deprecated functions obvious to the programmer.

Additional context
Doc comments support a Deprecated: section but there isn't an easy way to tell if something that has been deprecated is being used without reading the documentation or hovering over the function call.

@gopherbot gopherbot added this to the Untriaged milestone Mar 9, 2023
@findleyr
Copy link
Member

findleyr commented Mar 9, 2023

This looks a lot like https://go.dev/issue/40447.

I agree that we should add this. It is one of our most requested features.

@hyangah
Copy link
Contributor

hyangah commented Mar 10, 2023

If you use staticcheck (that's this extension's default 3rd party linter run by "go.lintOnSave" feature, and you can also enable this in gopls by using "gopls": { "ui.diagnostic.staticcheck": true }), SA1019 check will report this as diagnostic.

We have some ideas to integrate this as a default diagnostic but let's discuss this in the golang/go#40447.

@hyangah hyangah closed this as not planned Won't fix, can't repro, duplicate, stale Mar 10, 2023
@golang golang locked and limited conversation to collaborators Mar 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants