You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to enable experimental features but running into an issue around parameter formatting. I have the code, error, build.gradle, and the attempted solution below. If I turn off experimental rules there are no more errors thrown but I was not able to disable the rule I believe is causing the issue.
This seems to be the issue getting resolved in 0.39.0 but when I manually specify the version the error persists.
Code:
fun T.exampleFun(first:String, other:String): String {
returnif (first.equals(
other = other,
ignoreCase =true
) ||
<SECOND_CONDITIONAL>
) {
first
} else {
null
}
}
Error:
> Task :ktlintMainSourceSetFormat FAILED
/path/to/Example.kt:98:13: Unexpected indentation (expected 8, actual 12)
/path/to/Example.kt:99:13: Unexpected indentation (expected 8, actual 12)
/path/to/Example.kt:100:9: Unexpected indentation (expected 4, actual 8)
build.gradle
plugins {
id 'org.jlleitschuh.gradle.ktlint' version '9.4.1'
}
ktlint {
enableExperimentalRules =true
filter {
exclude { element-> element.file.path.contains("generated/") }
}
}
Attempted Solutions
disabledRules = ["experimental:argument-list-wrapping"] version = "0.39.0"
Working Solution
enableExperimentalRules = false
The text was updated successfully, but these errors were encountered:
I am trying to enable experimental features but running into an issue around parameter formatting. I have the code, error, build.gradle, and the attempted solution below. If I turn off experimental rules there are no more errors thrown but I was not able to disable the rule I believe is causing the issue.
This seems to be the issue getting resolved in
0.39.0
but when I manually specify the version the error persists.Code:
Error:
> Task :ktlintMainSourceSetFormat FAILED /path/to/Example.kt:98:13: Unexpected indentation (expected 8, actual 12) /path/to/Example.kt:99:13: Unexpected indentation (expected 8, actual 12) /path/to/Example.kt:100:9: Unexpected indentation (expected 4, actual 8)
build.gradle
Attempted Solutions
disabledRules = ["experimental:argument-list-wrapping"]
version = "0.39.0"
Working Solution
enableExperimentalRules = false
The text was updated successfully, but these errors were encountered: