mvdan / sh

A shell parser, formatter, and interpreter with bash support; includes shfmt
https://pkg.go.dev/mvdan.cc/sh/v3
BSD 3-Clause "New" or "Revised" License
7.28k stars 346 forks source link

cmd/shfmt: when using -ln=auto, tell the user what language was detected on an error #803

Closed mvdan closed 2 years ago

mvdan commented 2 years ago

I imagine some people will be confused when upgrading to the changed default if they have any scripts that contain Bash syntax but look like POSIX shell scripts. If the parser error message ends with something like (parsed as posix via -ln=auto), then hopefully that would be less confusing.