Skip to content

gofmt: support rewrite rule #3171

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

Closed
trim21 opened this issue Aug 31, 2022 · 1 comment · Fixed by #3174
Closed

gofmt: support rewrite rule #3171

trim21 opened this issue Aug 31, 2022 · 1 comment · Fixed by #3174
Labels
enhancement New feature or improvement

Comments

@trim21
Copy link

trim21 commented Aug 31, 2022

Your feature request related to a problem? Please describe.

now gofmt lint only support simplify, and gofmt support rewrite rule, proposal adding rewrite support to golangci's gofmt.

we can use it with -r 'interface{} -> any'

Describe the solution you'd like.

add a RunRewrite in golangci/gofmt

add a []string options to gofmt, and apply a set of replace rules on file.

Describe alternatives you've considered.

Not yet

Additional context.

No response

@trim21 trim21 added the enhancement New feature or improvement label Aug 31, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Aug 31, 2022

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement
Projects
None yet
1 participant