submariner-io / shipyard

Framework and scripts to create multiple Kubernetes clusters with kind (K8s in Docker) for local E2E testing and development.
https://submariner.io/for_developers/shipyard/
Apache License 2.0
46 stars 26 forks source link

Add shfmt automation #1737

Open dfarrell07 opened 1 month ago

dfarrell07 commented 1 month ago

Per a discussion during code review...

Nit: Should there be indentation inside this loop?

Which highlights that [shellcheck doesn't do format checking](https://github.com/koalaman/shellcheck/issues/2463). They recommend [shfmt](https://github.com/mvdan/sh). I can look into it if other people think it would be helpful.

_Originally posted by @dfarrell07 in https://github.com/submariner-io/shipyard/pull/1730#discussion_r1790801613_

dfarrell07 commented 1 month ago

There's a GHA that combines shfmt and shellcheck (and another tool): https://github.com/marketplace/actions/sh-checker

Trade-off is that we'd lose the ability to run it locally, which I think is important.