Create plugin for linting (#8942)
(cherry picked from commit c31e75f02f3021c52f6c24f655e2bded0c8b2b33) # Conflicts: # .github/workflows/build_pull_request.yml # .github/workflows/build_push.yml # app/build.gradle.kts # build.gradle.kts
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import org.jmailen.gradle.kotlinter.KotlinterExtension
|
||||
import org.jmailen.gradle.kotlinter.KotlinterPlugin
|
||||
|
||||
apply<KotlinterPlugin>()
|
||||
|
||||
extensions.configure<KotlinterExtension>("kotlinter") {
|
||||
experimentalRules = true
|
||||
|
||||
disabledRules = arrayOf(
|
||||
"experimental:argument-list-wrapping", // Doesn't play well with Android Studio
|
||||
"filename", // Often broken to give a more general name
|
||||
)
|
||||
}
|
||||
|
||||
tasks {
|
||||
named<DefaultTask>("preBuild").configure {
|
||||
if (!System.getenv("CI").toBoolean())
|
||||
dependsOn("formatKotlin")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user