Skip to content

Support new way to disable rules in ktlint 0.48 #1444

Closed
@bcmedeiros

Description

@bcmedeiros
  • [ 6.12.1 ] spotless version

Currently, using the ktlint_disabled_rules causes many warnings to be printed in the console:

Property 'ktlint_disabled_rules' is deprecated: Update all your all '.editorconfig' files. See [link below]

https://pinterest.github.io/ktlint/faq/#why-is-editorconfig-property-disabled_rules-deprecated-and-how-do-i-resolve-this

Following that, if I configure Spotless as below, the config is ignored and rules are still enabled.

configure<com.diffplug.gradle.spotless.SpotlessExtension> {
    kotlin {
        ktlint("0.48.0")
            .editorConfigOverride(
                mapOf(
                    "ktlint_standard_filename" to "disabled",
                ),
            )
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions