-
Notifications
You must be signed in to change notification settings - Fork 145
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
Empty switch case crashes elm-format on save #204
Comments
Elm format doesn't crash :-) IMHO I think it's fine that elm-format reports that there is an error in the code that makes in unreliable/impossible to format the file deterministically. Atom chooses to display a red error message which is fair enough I suppose. @willnwhite What would you expect to happen ? Silent failiure ? best effort formatting ? |
I would expect nothing to happen. No formatting is needed. |
Well elm-format can't know that without parsing the code. The code as it stands is invalid. That's what it's reporting back to Atom. Atom chooses to display that fact. If you are unhappy with that, maybe it would be more appropriate to raise that in the issue tracker for the relevant Atom plugin. |
elm-format prints the syntax error to the console in this case. So yes, this is an issue for the atom plugin. But I would like to provide guidelines for plugin developers. See #104 Is there we can add as guidance on how plugins should handle the case where there is a syntax error? |
This was an issue with the atom plugin, not with elm-format. |
The text was updated successfully, but these errors were encountered: