Lint changes (#7802)

- Fixes current lint issues
- Changes lint task to lintKotlin on PRs
This commit is contained in:
Andreas
2022-08-18 20:06:32 +02:00
committed by GitHub
parent 1f34f5277c
commit 09abfc7843
9 changed files with 24 additions and 34 deletions

View File

@@ -290,6 +290,10 @@ tasks {
}
}
withType<org.jmailen.gradle.kotlinter.tasks.LintTask>().configureEach {
exclude { it.file.path.contains("generated[\\\\/]".toRegex())}
}
// See https://kotlinlang.org/docs/reference/experimental.html#experimental-status-of-experimental-api(-markers)
withType<KotlinCompile> {
kotlinOptions.freeCompilerArgs += listOf(
@@ -315,7 +319,8 @@ tasks {
}
preBuild {
dependsOn(formatKotlin, copyHebrewStrings, localesConfigTask)
val ktlintTask = if (System.getenv("GITHUB_BASE_REF") == null) formatKotlin else lintKotlin
dependsOn(ktlintTask, copyHebrewStrings, localesConfigTask)
}
}