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

gci: improve error message #3777

Merged

Conversation

deathbots
Copy link
Contributor

@deathbots deathbots commented Apr 13, 2023

Adds custom-order flag
Supports gci StringArray breaking change introduced in version 0.10.0. CSV-style -s one,two,three must now be use -s one -s two -s three which now supports multiple prefixes.

Fixes #3776

Improve error message.

Adds custom-order flag
Supports gci StringArray breaking change introduced in version 0.10.0.
CSV-style `-s one,two,three` must now be `use -s one -s two -s three`
which now supports multiple prefixes.

Fixes golangci#3776
@boring-cyborg
Copy link

boring-cyborg bot commented Apr 13, 2023

Hey, thank you for opening your first Pull Request !

@CLAassistant
Copy link

CLAassistant commented Apr 13, 2023

CLA assistant check
All committers have signed the CLA.

@ldez ldez added linter: update Update the linter implementation inside golangci-lint enhancement New feature or improvement labels Apr 13, 2023
@ldez ldez changed the title fix(gci): Custom section ordering, new section flags gci: Custom section ordering, new section flags Apr 13, 2023
@ldez
Copy link
Member

ldez commented Apr 13, 2023

Hello,

your PR only changes the error message.

The feature is already implemented, and your tests prove that.

@ldez ldez changed the title gci: Custom section ordering, new section flags gci: improve error message Apr 13, 2023
@deathbots
Copy link
Contributor Author

Hello,

your PR only changes the error message.

The feature is already implemented, and your tests prove that.

You are indeed correct, of course! I was flipping between two different golangci-lint and, thus, bundled gci versions - split between its multi-prefix support, and my own config had two prefixes. The error message threw me, as suggestion didn't work in my standalone, newer gci as the flags changed.

All is well, thanks for the hard work and fast response.

Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ldez ldez merged commit 842abcd into golangci:master Apr 21, 2023
16 checks passed
@ldez ldez added this to the v1.53 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement linter: update Update the linter implementation inside golangci-lint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GCI cannot use custom section ordering, and cannot use multiple prefixes added in gci 0.10.0
3 participants