kotlin-dsl-conventions
kotlin-dsl-conventions copied to clipboard
Only lint the build and settings scripts
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.