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
{{ message }}
Repository navigation
Can not create an EditorConfigOverride without properties. Use 'emptyEditorConfigOverride' instead. #1374
kotlin {
ktlint("0.47.1")
.setUseExperimental(true)
.editorConfigOverride([ 'max-line-length': 120, 'wrapping': false])
}
Can not create an EditorConfigOverride without properties. Use 'emptyEditorConfigOverride' instead.
When i add 'indent_size': 2 to editorConfigOverride, android studio build success.
> Task :common-auth:spotlessKotlin FAILED
Step 'ktlint' found problem in 'src/main/kotlin/exceptions.kt':
Can not create an EditorConfigOverride without properties. Use 'emptyEditorConfigOverride' instead.
java.lang.IllegalArgumentException: Can not create an EditorConfigOverride without properties. Use 'emptyEditorConfigOverride' instead.
at com.pinterest.ktlint.core.api.EditorConfigOverride$Companion.from(EditorConfigOverride.kt:36)
at com.diffplug.spotless.glue.ktlint.compat.KtLintCompat0Dot47Dot0Adapter.createEditorConfigOverride(KtLintCompat0Dot47Dot0Adapter.java:123)
at com.diffplug.spotless.glue.ktlint.compat.KtLintCompat0Dot47Dot0Adapter.format(KtLintCompat0Dot47Dot0Adapter.java:72)
at com.diffplug.spotless.glue.ktlint.KtlintFormatterFunc.applyWithFile(KtlintFormatterFunc.java:71)
at com.diffplug.spotless.FormatterFunc$NeedsFile.apply(FormatterFunc.java:154)
at com.diffplug.spotless.FormatterStepImpl$Standard.format(FormatterStepImpl.java:82)
at com.diffplug.spotless.FormatterStep$Strict.format(FormatterStep.java:88)
at com.diffplug.spotless.Formatter.compute(Formatter.java:230)
at com.diffplug.spotless.PaddedCell.calculateDirtyState(PaddedCell.java:203)
at com.diffplug.spotless.PaddedCell.calculateDirtyState(PaddedCell.java:190)
at com.diffplug.gradle.spotless.SpotlessTaskImpl.processInputFile(SpotlessTaskImpl.java:102)
at com.diffplug.gradle.spotless.SpotlessTaskImpl.performAction(SpotlessTaskImpl.java:88)
Activity
ymaniz09 commentedon Oct 18, 2022
Same issue here, the only difference is that I'm using Gradle 7.3.0
bcmedeiros commentedon Oct 19, 2022
same thing here when trying to se
ktlint_disabled_rules, follows the code snippet:I get the following error:
bcmedeiros commentedon Oct 19, 2022
I did some digging, for the line length, the property needs to be snake case:
org.ec4j.core.model.PropertyType#max_line_length.As for
ktlint_disabled_rules, it's really missing.tbcrawford commentedon Oct 21, 2022
This should be fixed in the next release of ktlint, 0.48.0. PR that fixes it: ktlint/ktlint#1671
However, support for 0.47.x here in spotless would be great!
bcmedeiros commentedon Oct 21, 2022
@tcrawford-figure Adjusted my PR so it's fixed for 0.47.x, let me know what you think.
nedtwigg commentedon Nov 24, 2022
Fixed in
plugin-gradle 6.12.0andplugin-maven 2.28.0.