-
Notifications
You must be signed in to change notification settings - Fork 11
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
"Reformat" breaks the pkl file validity #26
Comments
Whew, that's a pretty ugly result from formatting. Thanks for the report. |
the problem here is semicollon. If you remove all the semicollons it should format correctly |
Thanks for the answer! According to the docs, semicolon is an allowed delimiter. If it's not supported, I would expect it to be highlighted by the IDE. Also, IIRC, I got this ill-formatted pkl from the json module during import. |
Just checked, when I use the following command:
I've got an output that cannot be formatted by IDEA |
Semicolons are treated as whitespace in Pkl. FYI; our style guide is to use them to separate inline object members--if object members are on their own line, semicolons should be omitted. |
Got you, thanks! I think they should be underlined as incorrect then |
Don’t get me wrong: I am just pointing out the problem that case formattter to act up is semicolon, it can be worked around by just removing every thing, but it’s better to be fixed . |
Let's say I have a poorly-formatted, but working file:
When I run the command
It successfully compiles an expected json.
However, when I execute a "Reformat" action (and I do it all the time), I get the following:
This file cannot be compiled to JSON anymore.
I would expect the "Reformat" to not break my code and, if possible, align it.
My environment:
The text was updated successfully, but these errors were encountered: