Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mvdan opened this issue Jan 28, 2022 · 0 comments · Fixed by #867
Closed

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

mvdan opened this issue Jan 28, 2022 · 0 comments · Fixed by #867
Assignees

Comments

@mvdan
Copy link
Owner

mvdan commented Jan 28, 2022

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.

@riacataquian riacataquian self-assigned this May 25, 2022
riacataquian added a commit to riacataquian/sh that referenced this issue May 27, 2022
explicitly state language dialect on `syntax.LangError`s 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 mvdan#803
riacataquian added a commit that referenced this issue May 27, 2022
explicitly state language dialect on `syntax.LangError`s 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants