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
go/format leaves the "negative" and the "positive" comments untouched. This is presumably because it is ambiguous whether the comment is associated with the code above or the case statement below.
I'd suggest as a heuristic that if there is a blank line before the comment (or a run of comments with no blank lines) and no blank line afterwards, then it should be aligned with the case statement.
This would fix many misaligned comments in CL 4851.
The text was updated successfully, but these errors were encountered:
Consider this code
go/format
leaves the "negative" and the "positive" comments untouched. This is presumably because it is ambiguous whether the comment is associated with the code above or the case statement below.I'd suggest as a heuristic that if there is a blank line before the comment (or a run of comments with no blank lines) and no blank line afterwards, then it should be aligned with the case statement.
This would fix many misaligned comments in CL 4851.
The text was updated successfully, but these errors were encountered: