Skip to content

gofmt: support rewrite rule #3171

Closed
@trim21

Description

@trim21

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions