-
Notifications
You must be signed in to change notification settings - Fork 504
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
Kotlin 1.4 trailing commas marked as invalid syntax #729
Comments
Actually it is already supported in Kotlin 1.3.70, see https://youtrack.jetbrains.com/issue/KT-34743 Probably requires to set Also related to #709 |
This is still not resolved on my code, what was the workaround? |
I have configured the version manually (because the plugin pulled in 0.35.0) and the issue went away: kotlin {
ktlint("0.40.0")
} |
Thanks! |
While what @rethab suggests most likely will work, if your project determines the Once this PR goes in, the other option to fix this issue would be updating This way there aren't two places where the dependencies for the Cheers! |
@yuesaka-m you don't need to wait for |
@Tapchicoma oh great, didn't know that configuration option existed, thanks! |
Expected Behavior
Kotlin 1.4 introduces the ability to have trailing commas (https://blog.jetbrains.com/kotlin/2019/12/what-to-expect-in-kotlin-1-4-and-beyond/#trailing-commas).
ktlint
currently marks this as invalid syntaxObserved Behavior
ktlint
throws the following error:Not a valid Kotlin file (expecting a parameter declaration) (cannot be auto-corrected)
Steps to Reproduce
Run
ktlint
on the following contentsYour Environment
0.36.0
id("org.jlleitschuh.gradle.ktlint") version "9.2.1"
(Gradle plugin)5.6.4
The text was updated successfully, but these errors were encountered: