opencontainers / image-spec

OCI Image Format
https://www.opencontainers.org/
Apache License 2.0
3.46k stars 636 forks source link

ci(lint): enable gci linter #1132

Closed mmorel-35 closed 7 months ago

mmorel-35 commented 1 year ago

Order imports and places github.com/opencontainers modules at last.

Signed-off-by: Matthieu MOREL matthieu.morel35@gmail.com

sudo-bmitch commented 1 year ago

Is there any advantage of going with the gci linter over the builtin goimports tool? E.g. goimports -w -local github.com/opencontainers . makes the same ordering change.

mmorel-35 commented 1 year ago

It seems like goimports only handle the local import why gci is more flexible as you can define more rules. But for the most common use which is to have the local import at last they behave the same way. And in that case it is more a matter of habit.