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

gofmt: support rewrite #3172

Closed
wants to merge 1 commit into from
Closed

gofmt: support rewrite #3172

wants to merge 1 commit into from

Conversation

trim21
Copy link

@trim21 trim21 commented Aug 31, 2022

close #3171

need to merge golangci/gofmt#2 first and update gofmt in go.mod

example:

$ go run .\cmd\golangci-lint\main.go run --disable-all -E=gofmt --gofmt.rewrite='interface{} -> any'
pkg\fsutils\filecache.go:59: File is not `gofmt`-ed with `-s -r "interface{} -> any"` (gofmt)
        fc.files.Range(func(_, fileBytes interface{}) bool {
internal\errorutil\errors.go:9: File is not `gofmt`-ed with `-s -r "interface{} -> any"` (gofmt)
        recovered interface{}
pkg\report\log.go:23: File is not `gofmt`-ed with `-s -r "interface{} -> any"` (gofmt)
func (lw LogWrapper) Fatalf(format string, args ...interface{}) {
exit status 1

golangci.yaml

  gofmt:
    simplify: true
    rewrite: 'interface{} -> any'

@boring-cyborg
Copy link

boring-cyborg bot commented Aug 31, 2022

Hey, thank you for opening your first Pull Request !

@CLAassistant
Copy link

CLAassistant commented Aug 31, 2022

CLA assistant check
All committers have signed the CLA.

@ldez ldez self-requested a review August 31, 2022 12:32
@ldez ldez added the linter: update Update the linter implementation inside golangci-lint label Aug 31, 2022
@ldez
Copy link
Member

ldez commented Aug 31, 2022

I close it for now. The issue and the other PR are still open.

@ldez ldez closed this Aug 31, 2022
@ldez ldez added the declined label Aug 31, 2022
@ldez
Copy link
Member

ldez commented Sep 1, 2022

superseded by #3174

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
declined linter: update Update the linter implementation inside golangci-lint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gofmt: support rewrite rule
3 participants