You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should certainly not crash. In the short term, maybe it should ignore (not format) this particular syntactical block, and format the rest of the file.
Not to be prescriptive about how to format... but since you asked: It should format like this, or similar. It should probably align the comment with the other array elements. It should format the non-comments as if the comment didn't exist (but put the comment back where it belongs):
In this case it refuses to format that expression because it knows it would lose the comment. It comes out as a crash, but the error message is something like:
INTERNAL: Formatting was skipped because a comment at [location] would be deleted by the formatter: //break formatter
This is probably due to a bug (which may not have been reported yet). To complete formatting, try moving the comment to a different line.
Describe the bug
If one has a comment, on its own line, inside an array literal, the formatter crashes. I suspect
To Reproduce
Run the formatter.
Expected behavior
It should certainly not crash. In the short term, maybe it should ignore (not format) this particular syntactical block, and format the rest of the file.
Not to be prescriptive about how to format... but since you asked: It should format like this, or similar. It should probably align the comment with the other array elements. It should format the non-comments as if the comment didn't exist (but put the comment back where it belongs):
The text was updated successfully, but these errors were encountered: