diff --git a/maintenance/shfmt.sh b/maintenance/shfmt.sh new file mode 100755 index 000000000..dcfc25f0f --- /dev/null +++ b/maintenance/shfmt.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +shfmt_args=( + --indent 4 + --keep-padding # keep column alignment paddings + --space-redirects # redirect operators will be followed by a space + --binary-next-line # binary ops like && and | may start a line + --case-indent # switch cases will be indented +) + +shfmt "${shfmt_args[@]}" "$@" \ + helpers/helpers \ + helpers/helpers.v2.1.d/* \ + helpers/helpers.v2.d/* \ + hooks/*