dev: add shfmt for shell script consistency
Created by: ggilmore
shfmt is gofmt
for shellscripts. I've been using it successfully on a few other repos and I thought it'd be nice to introduce it here too to ensure that all our scripts have consistent formatting.
This PR adds:
- A new VSCode recommended extension: https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format
- A new set of editor configurations
- A new CI check to enforce this formatting
You can tell shfmt
to format all files in-place by running shfmt -w .
in the root of this repository.
I've configured the formatter to use the formatting guidelines in Google's shell style guide. Look at this PR's diff to see what our scripts look like with this formatting.