spicypete
Joined 3 years ago
Karma
152
Submissions
18
Member since
Nov 16
Joined 3 years ago
I fixed this in the 0.2.8 release https://github.com/reteps/dockerfmt/releases/tag/0.2.8.
Relevant reading about the `&&` normalization. https://pkg.go.dev/encoding/json#Marshal
if [ foo ] ; then
bar
fi
to if [ foo ]
then
bar
fi
And also format your example to foo
bar
In this type of situation, it becomes a little trickier to disambiguate when I need to add semicolons and a backslash, and when I need to add only backslashes. If you use `&&` -- you have disambiguated the two cases so I can format it.