mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-25 10:37:51 +02:00
Create plugin for linting (#8942)
This commit is contained in:
20
buildSrc/src/main/kotlin/tachiyomi.lint.gradle.kts
Normal file
20
buildSrc/src/main/kotlin/tachiyomi.lint.gradle.kts
Normal file
@ -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