You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Indentation of empty case places ;; in the same line as the case #1289
#!/bin/sh
case "$1" in
first)
;;
second)
echo "here"
;;
esac
Running shfmt produces:
#!/bin/sh
case "$1" in
first) ;;
second)
echo "here"
;;
esac
Which places the ;; in the same line as the case. This means that when you want to add content to that "first" case, you need to modify that line and split it into two, which produces unnecessary diff(1) or git-diff(1) changes.
(I skimmed over the other tickets and didn't see this being filed already, but might have missed some perhaps.)
Activity
mvdan commentedon Mar 14, 2026
Thanks for the suggestion, that's reasonable. I'll take a look.
syntax: don't join ;; with the previous line when formatting
fix(deps): update module mvdan.cc/sh/v3 to v3.13.1 (#397)
chore(deps): update module mvdan.cc/sh/v3/cmd/shfmt to v3.13.1 (hetzn…
interp: project source identity for fmt type verbs