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

"Missing newline after "("" triggered with parameter comments #433

Closed
bethcutler opened this issue May 22, 2019 · 2 comments · Fixed by #434
Closed

"Missing newline after "("" triggered with parameter comments #433

bethcutler opened this issue May 22, 2019 · 2 comments · Fixed by #434
Labels

Comments

@bethcutler
Copy link
Contributor

bethcutler commented May 22, 2019

I've enabled the --experimental flag on ktlint 0.32, and now we are seeing this error when there are comments on parameters, e.g.:

foo(
  /*param1=*/ param1,
  /*param2=*/ param2
)

If foo() is defined in Kotlin, we can fix the error by changing the comments to parameter names. However, if foo() is defined in Java, there seems to be no way to name the parameters without triggering this erroneous message.

@shashachu shashachu added the bug label May 22, 2019
@shashachu
Copy link
Contributor

I think I see the issue. I'll put up a PR soon.

shashachu added a commit to shashachu/ktlint that referenced this issue May 22, 2019
shashachu added a commit that referenced this issue May 22, 2019
…if parameter comments were used (#434)

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

Fixes #433
@bethcutler
Copy link
Contributor Author

Thanks for the quick fix!

orchestr7 pushed a commit to saveourtool/diktat that referenced this issue Jun 29, 2020
…if parameter comments were used (#434)

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

Fixes pinterest/ktlint#433
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
2 participants