Skip to content

x/tools/cmd/goimports: add a flag to skip generated files #71676

@adambabik

Description

@adambabik

I use goimports as follows:

goimports -local="github.com/my/package" -w -l .

It works as expected, going through the given directory and formatting all files.

The problem is that the directory contains generated files, i.e. files with the first line // Code generated by XXX. DO NOT EDIT., and there is no flag to skip such files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolProposalIssues describing a requested change to a Go tool or command-line program.ToolsThis label describes issues relating to any tools in the x/tools repository.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions