gci: bug: v0.4.0 changes default ordering
https://github.com/daixiang0/gci/pull/70/files#r917027845
The already-good code changed from standard, default, prefix(github.com/daixiang0/gci) to standard, prefix(github.com/daixiang0/gci), default even though the sections configuration did not change: https://github.com/daixiang0/gci/blob/9349c88f1609b0e71ec5cac5576b1a413ac25869/pkg/gci/internal/testdata/common.cfg.yaml
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 20 (17 by maintainers)
I would like to second this. This is the main reason I started using
gci, as it states in the README:I had been using
gciunder the assumption that I could also control the order of the import blocks with the order of section flags, and had been configuring it as such, exactly how twmb said.There would be a misunderstanding that I never say the section order can be configured, I will update the document to make it clear.
Now the imports like:
The custom section is for your own org, the reason is based on how far the imports are from your repo. The āstandardā is built-in, which should be first. The default section means all 3rd-party imports, should be last.
If Iām understanding it correctly, youāre saying that itās no longer an option to organize custom imports after default?
My organization previously was:
Thatās my only use case, and the one use case I see consistently across other repos and orgs, and have used for years.