Skip to content
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

Fixing issue where ktlint would erroneously want to insert a newline if parameter comments were used #434

Merged
merged 5 commits into from
May 22, 2019

Conversation

shashachu
Copy link
Contributor

Fixes #433

// Skip comments, whitespace, and empty nodes
!it.isPartOfComment() &&
// Skip comments, whitespace, and empty nodes
!it.isPartOfComment() &&
!it.isWhiteSpaceWithoutNewline() &&
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This formatting looks weird to me, but IntelliJ does the same thing.

Copy link
Contributor

Choose a reason for hiding this comment

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

looks right; it's a continuation indent.

Copy link
Contributor

@NightlyNexus NightlyNexus left a comment

Choose a reason for hiding this comment

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

lgtm

// Skip comments, whitespace, and empty nodes
!it.isPartOfComment() &&
// Skip comments, whitespace, and empty nodes
!it.isPartOfComment() &&
!it.isWhiteSpaceWithoutNewline() &&
Copy link
Contributor

Choose a reason for hiding this comment

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

looks right; it's a continuation indent.

Test.kt Outdated
@@ -0,0 +1,11 @@
fun main() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

doh i did not mean to check this in.

@shashachu shashachu merged commit 49dd555 into pinterest:master May 22, 2019
@shashachu shashachu deleted the param-comments branch May 22, 2019 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Missing newline after "("" triggered with parameter comments
2 participants