-
-
Notifications
You must be signed in to change notification settings - Fork 328
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
parse: does not understand case fallthrough tokens #13
Comments
Ah, this is simply a bash token (not POSIX) that I hadn't added yet. Thanks for spotting! |
No problem. Thanks for sharing this code. Aside from that one token it was perfectly happy to apply a consistent style to a bunch of organically grown scripts that each contained multiple different styles. If I were a stronger Go programmer and had more time I'd have tried to fix it myself and open a PR, but I figured a good bug report would still be appreciated. Again, thanks for sharing your code! |
Cool :)
Parsers become stupidly complex very easily, especially one that parses Shell. So no worries on that front - it's much easier for me to fix things like these as I'm already familiar with the codebase. |
Thanks for the quick fix! The new version no longer throws the error for me. |
Among other improvements the author fixed mvdan/sh#13
Among other improvements the author fixed mvdan/sh#13
@nshalman could you please update it to 0.2.0 there? Thanks! |
As shown above, I've created NixOS/nixpkgs#19524 |
@nshalman thanks! |
@nshalman please update to 1.1.0 :) |
PR created: NixOS/nixpkgs#21695 |
shfmt
is totally fine with this code:But with this code:
I get this (I believe) erroneous error:
sample.sh:11:4: ; can only immediately follow a statement
Relevant Documentation:
https://www.gnu.org/software/bash/manual/bashref.html#index-case
The text was updated successfully, but these errors were encountered: