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.14k stars 338 forks source link

shfmt: state -ln=auto on posix parse errors #867

Closed riacataquian closed 2 years ago

riacataquian commented 2 years ago

explicitly state language dialect on syntax.LangErrors when ln is set to auto

for example, incompatible bash constructs will cause parse errors due to the parser using posix as language dialect

fixes #803