kotlin-dsl-conventions icon indicating copy to clipboard operation
kotlin-dsl-conventions copied to clipboard

Only lint the build and settings scripts

Open wolfs opened this issue 4 years ago • 0 comments

The default input for the ktlintScriptSourceCheck are all *.kts files in the project directory. This causes all kinds of problems, especially with the new missing dependency validation.

We should configure the ktlintScriptSourceCheck tasks to only include build.gradle.kts and settings.gradle.kts by default. We did this for now in the Gradle build by https://github.com/gradle/gradle/pull/15590.

Note that scripts in the Kotlin source sets are still checked by the ktlintMainSourceSetCheck kind of tasks.

This should be done by the conventions plugin and maybe, eventually, by the ktlint plugin directly.

wolfs avatar Dec 15 '20 15:12 wolfs