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

proposal: cmd/fix: apply modernizers #71859

Open
jba opened this issue Feb 20, 2025 · 0 comments
Open

proposal: cmd/fix: apply modernizers #71859

jba opened this issue Feb 20, 2025 · 0 comments
Assignees
Labels
Analysis Issues related to static analysis (vet, x/tools/go/analysis) Proposal Refactoring Issues related to refactoring tools ToolProposal Issues describing a requested change to a Go tool or command-line program.
Milestone

Comments

@jba
Copy link
Contributor

jba commented Feb 20, 2025

Proposal Details

go fix should have a type of fix called modernize that applies modernizers.

As an example, running go fix would change all occurrences of interface{} to any, provided the identifier any is not shadowed.

For the current set of modernizers, see https://go.googlesource.com/tools/+/refs/heads/master/gopls/internal/analysis/modernize.

@jba jba added the Proposal label Feb 20, 2025
@jba jba assigned jba and adonovan Feb 20, 2025
@gopherbot gopherbot added this to the Proposal milestone Feb 20, 2025
@gabyhelp gabyhelp added the ToolProposal Issues describing a requested change to a Go tool or command-line program. label Feb 20, 2025
@adonovan adonovan added Analysis Issues related to static analysis (vet, x/tools/go/analysis) Refactoring Issues related to refactoring tools labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Analysis Issues related to static analysis (vet, x/tools/go/analysis) Proposal Refactoring Issues related to refactoring tools ToolProposal Issues describing a requested change to a Go tool or command-line program.
Projects
None yet
Development

No branches or pull requests

4 participants