goimports-reviser icon indicating copy to clipboard operation
goimports-reviser copied to clipboard

Allow specifying multiple files as arguments

Open foens opened this issue 2 years ago • 1 comments

Hi there.

We have current tooling that can detect which files were changed in a large repository. We currently pass all the paths to these files to gofmt for formatting, but would like to use this tool instead.

However, since we are only able to pass a single file at a time, there is a performance overhead, as we need to call the binary many times.

If we pass a full folder, the tool will use wasted cycles running on code that was not changed, which will not work on our large codebase.

Is it possible that you could support formatting any number of files given as arguments?

foens avatar Nov 28 '22 19:11 foens

find . -name '*.go' -type f -not -path './build*' -exec goimports-reviser -use-cache -rm-unused {} \;

This is how I use it, I hope it can help you.

zakir-code avatar Mar 01 '23 08:03 zakir-code