incu6us / goimports-reviser

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

fix bug `list-diff` support dir mode #140

Closed Ericwww closed 9 months ago

Ericwww commented 10 months 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.

139

codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (85f8a62) 90.38% compared to head (819921b) 90.44%. Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #140 +/- ## ========================================== + Coverage 90.38% 90.44% +0.05% ========================================== Files 9 9 Lines 645 649 +4 ========================================== + Hits 583 587 +4 Misses 43 43 Partials 19 19 ``` | [Flag](https://app.codecov.io/gh/incu6us/goimports-reviser/pull/140/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vyacheslav+Pryimak) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/incu6us/goimports-reviser/pull/140/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vyacheslav+Pryimak) | `90.44% <100.00%> (+0.05%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vyacheslav+Pryimak#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Ericwww commented 9 months ago

@incu6us Hello. If you are free, have a look on this pull request please, thank you. 😄

incu6us commented 9 months ago

@incu6us Hello. If you are free, have a look on this pull request please, thank you. 😄

hi @Ericwww Checking

incu6us commented 9 months ago

fixed in v3.6.0