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

Several flags don't work when using ./... as a target #93

Closed
erinwild opened this issue Nov 18, 2022 · 3 comments
Closed

Several flags don't work when using ./... as a target #93

erinwild opened this issue Nov 18, 2022 · 3 comments

Comments

@erinwild
Copy link

I'm trying to set both -list-diff and -set-exit-status while using ./... as the target, but they don't seem to work. Instead changes are written to all files with no list of files outputted to stdout or with an exit status.

goimports-reviser -list-diff -set-exit-status ./...

I also tried goimports-reviser -list-diff $(find . -type f -name '*.go') which worked with goimports, but it just lists the first file.

Is there a way to set either of these while also targeting all .go files in my repo?

@devenami
Copy link
Contributor

for file in `find . -type f -name '*.go'`
do
goimports-reviser -list-diff -set-exit-status $file
done

You can use the script above to replace

@LittleCuteBug
Copy link

the pull request #126 haven't resolve this issue
goimports-reviser -set-exit-status ./... and several flags still not work

micaelmalta added a commit to micaelmalta/goimports-reviser that referenced this issue May 27, 2024
@micaelmalta
Copy link

the pull request #126 haven't resolve this issue goimports-reviser -set-exit-status ./... and several flags still not work

Fix on #157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants