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
ClassCastException when loading trailing comma settings from editorconfig #1288
Comments
The rule still works for me. Can you please add a code sample which causes the error? Other things that you might want to try as it could give additional insights:
|
I feel like I've seen this issue before, it's most likely because you can't use mixed (spaces vs no-spaces) editorconfig values. If you remove the spaces around
|
I have the same problem as Op, but removing the space around the
I confirm that i have the problem with Java 17, but not with Java 8 |
@tailrecur @gotson Can you please check whether this problem is solved with the 0.44.0 release? |
Closing issue as no response was received in last 29 days. |
I can confirm that similar exception still (Ktlint v0.46.1) happens for me, albeit it happens for property Gradle version:
Running the CLI version of Ktlint has the same problem. Simply commenting out the |
Tnx for reporting. Issue #1559 has been reported for |
Hi there, I have the same issue as the OP. I am using ktlint 0.47.0 and Java 11 (OpenJDK 11.0.12) on Windows 10 (Win10 Pro 21H2), although I can reproduce the issue with Java 8 and Java 17 as well. Removing whitespaces does not seem to make any difference. It seems, however, that the issue arises only when the Here is a little demonstration: ktlint_test.zip
|
Works as from 0.47.1 for me. Thanks!
|
Expected Behavior
ktlint
loads the trailing comma settings from.editorconfig
successfullyObserved Behavior
ktlint
crashes with the following stacktrace:Steps to Reproduce
build.gradle.kts
contents:.editorconfig
file contents:Running the following command causes the above-mentioned stacktrace:
Your Environment
0.43.0
org.jlleitschuh.gradle.ktlint:10.2.0
The text was updated successfully, but these errors were encountered: