incu6us / goimports-reviser

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

[#144] If it is single import, do not convert into an import list #145

Closed Ericwww closed 7 months ago

Ericwww commented 9 months ago

To fix #144

Adjust the position to determine whether an empty string Token &ast.ImportSpec{Path: &ast.BasicLit{Value: "", Kind: token.STRING}} needs to be added.

codecov[bot] commented 9 months ago

Codecov Report

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

Comparison is base (194719a) 89.08% compared to head (2902c85) 89.06%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #145 +/- ## ========================================== - Coverage 89.08% 89.06% -0.02% ========================================== Files 9 9 Lines 687 686 -1 ========================================== - Hits 612 611 -1 Misses 52 52 Partials 23 23 ``` | [Flag](https://app.codecov.io/gh/incu6us/goimports-reviser/pull/145/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/145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vyacheslav+Pryimak) | `89.06% <100.00%> (-0.02%)` | :arrow_down: | 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.