-
Notifications
You must be signed in to change notification settings - Fork 506
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
ClassCastException using ktlintFormat on class with KDoc in version 0.43.0 #1270
Comments
This problem is caused by the fix for issue #1204. The fix works for normal block comments but causes issue with KDoc containing a trailing space. In your example this space is found at the line below:
|
@paul-dingemans Thanks for the answer! So can i work around that somehow or should i wait for the fix of the fix? |
Workaround is to simply remove that space ;-) It has to be fixed in the next release as it totally not clear what the exact problem is. |
@paul-dingemans i'm using ktlint to clear those spaces for me. Those are left there by the openapi-generator and we have a lot more dtos with the same issue. No problem, i'll wait :) |
…on 0.43.0 (#1276) * Updated refs to latest (0.43.0) release * Remove trailing spaces from KDoc Closes #1270 * Fix violation offset and add test for EOL comments * Update CHANGELOG.md Co-authored-by: Sha Sha Chu <shasha@pinterest.com> Co-authored-by: Paul Dingemans <pdingemans@bol.com> Co-authored-by: Roman Zavarnitsyn <rom4ek93@gmail.com>
I got a
ClassCastException
when trying to format class that has KDoc.The issue is on 0.43.0. Works perfectly on 0.41.0. (on 0.42.1 too, but it has too much rules broken for me to rely on)
Expected Behavior
It should format correctly
Observed Behavior
Steps to Reproduce
Snippet to reproduce the issue
Your Environment
org.jlleitschuh.gradle.ktlint
in version10.2.0
, taskktlintFormat
The text was updated successfully, but these errors were encountered: