Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow whitespace after lpar followed by a comment #664

Merged

Conversation

romtsn
Copy link
Collaborator

@romtsn romtsn commented Dec 1, 2019

Fix #653.

Technically, IDEA actually allows both

System.out.println( // 123
    "test single comment"
)

And

System.out.println(// 123
    "test single comment"
)

This PR is only targeting to fix the former case, whilst the latter will still be violated by the comment-spacing rule. I think it's a good tradeoff between readability and compatibility with idea. Let me know, if you think we should also change comment-spacing to allow both cases.

Copy link
Collaborator

@Tapchicoma Tapchicoma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is correct to support only first case. Thank you for fixing the bug in rule 👍

@Tapchicoma Tapchicoma merged commit 10dd8ff into pinterest:master Dec 1, 2019
@romtsn romtsn deleted the spacing-after-lpar-with-comment branch December 1, 2019 20:38
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot satisfy both paren-spacing and comment-spacing
2 participants