incu6us / goimports-reviser

Right imports sorting & code formatting tool (goimports alternative)
MIT License
607 stars 72 forks source link

`list-diff` flag is not work when a recursive path (./...) is given #139

Closed Ericwww closed 1 year ago

Ericwww commented 1 year ago

Hi, everyone.

I want to integrate goimports-reviser into our CI/CD to ensure that code gating will fail when the import ordering is not as expected.

But I found that list-diff flag is not work when a recursive path (./...) is given.

I am making a PR to fix this bug. But I have one question.

What is the right behavior when `list-diff` flag is given?
Refact code and print file path? or only print file path?

From what I remember, when you run the goimports -l command, it only prints the file path without refactoring the code.

I don't know what behavior is expected here for goimports-reviser.

Ericwww commented 1 year ago

Here is my PR #140

incu6us commented 1 year ago

Use v3.6.0 tag with the fix