kubernetes / kubeadm

Aggregator for issues filed against kubeadm
Apache License 2.0
3.75k stars 716 forks source link

add import order tool to this repository #2551

Closed neolit123 closed 3 years ago

neolit123 commented 3 years ago

xref https://github.com/kubernetes/kubeadm/issues/2515

the tool for import ordering was rejected from k/k, but we can at least archive it in this repository. https://github.com/kubernetes/kubernetes/pull/103981

a good location for the tool + scripts is /kinder/hack, which will effectively also manage the imports of kinder.

the tool + scripts will need some minor adjustments to not default to k8s.io/kubernetes as the local path.

cc @xinydev as you have the source code for it.

xinydev commented 3 years ago

/assign

fabriziopandini commented 3 years ago

Q: is there a reason why are we adding more rules than Kubernetes/than the ones that are enforced by available linterts? I other words, what I'm trying to understand what is what is is the advantage in becoming opinionated about imports for this repository only and if this is worth maintaining a linter in this repository.

neolit123 commented 3 years ago

Go upstream discussions are qualifing it as a missing feature in gofmt, goimport, other. I.e. go tools are failing in their coding style consitency.

The k/k imports are quite messy, yet such a tool saw both +1s and -1s. My proposal was to archive it here. It can be disabled in CI and executed on demand only. On Aug 23, 2021 15:29, "Fabrizio Pandini" @.***> wrote:

Q: is there a reason why are we adding more rules than Kubernetes/than the ones that are enforced by available linterts? I other words, what I'm trying to understand what is what is is the advantage in becoming opinionated about imports for this repository only and if this is worth maintaining a linter in this repository.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kubernetes/kubeadm/issues/2551#issuecomment-903720258, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACRATAZYQVPYHYQFWQNZDLT6I5LTANCNFSM5CK4YR4A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .