gradle / kotlin-dsl-conventions

Gradle Kotlin DSL conventional plugins
Other
25 stars 6 forks source link

Only lint the build and settings scripts #2

Open wolfs opened 3 years ago

wolfs commented 3 years ago

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.