Skip to content
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

Ktlint rules will be invalid if I override an invalid rule of EditorConfig in Spotless 6.13.0 #1495

Closed
Goooler opened this issue Jan 16, 2023 · 1 comment · Fixed by #1502
Labels

Comments

@Goooler
Copy link
Member

Goooler commented Jan 16, 2023

  1. Override Ktlint rules with ktlint("0.48.1").editorConfigOverride(mapOf("ktlint_filename" to "disabled")), but the ktlint_filename is invalid, it should be ktlint_standard_filename in Ktlint 0.48.1.
  2. Make a style conflict in any kt file.
  3. Run ./gradlew spotlessCheck but without exception thrown.

My Spotless config:

    configure<SpotlessExtension> {
        kotlin {
            target("**/*.kt")
            targetExclude("$buildDir/**/*.kt")
            targetExclude("bin/**/*.kt")
            ktlint("0.48.1").editorConfigOverride(mapOf("ktlint_filename" to "disabled"))
            licenseHeaderFile(rootProject.file("spotless/copyright.txt"))
        }
    }

My env: Gradle 7.6 & Spotless 6.13.0 & Ktlint 0.48.1 & MacOS 13.1, you can repro this issue on Goooler/tivi#6.

@nedtwigg
Copy link
Member

Released in plugin-gradle 6.14.0 and plugin-maven 2.31.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants