mirror of
https://github.com/vector-im/riotX-android
synced 2025-10-06 00:02:48 +02:00
Set up detekt gradle plugin
This commit is contained in:
16
build.gradle
16
build.gradle
@@ -35,9 +35,11 @@ buildscript {
|
||||
}
|
||||
}
|
||||
|
||||
// ktlint Plugin
|
||||
plugins {
|
||||
// ktlint Plugin
|
||||
id "org.jlleitschuh.gradle.ktlint" version "10.3.0"
|
||||
// Detekt
|
||||
id "io.gitlab.arturbosch.detekt" version "1.20.0"
|
||||
}
|
||||
|
||||
// https://github.com/jeremylong/DependencyCheck
|
||||
@@ -52,6 +54,7 @@ dependencyCheck {
|
||||
|
||||
allprojects {
|
||||
apply plugin: "org.jlleitschuh.gradle.ktlint"
|
||||
apply plugin: "io.gitlab.arturbosch.detekt"
|
||||
|
||||
repositories {
|
||||
// Do not use `mavenCentral()`, it prevents Dependabot from working properly
|
||||
@@ -140,6 +143,17 @@ allprojects {
|
||||
"experimental:kdoc-wrapping",
|
||||
]
|
||||
}
|
||||
|
||||
detekt {
|
||||
// preconfigure defaults
|
||||
buildUponDefaultConfig = true
|
||||
// activate all available (even unstable) rules.
|
||||
allRules = false
|
||||
// point to your custom config defining rules to run, overwriting default behavior
|
||||
config = files("$rootDir/tools/detekt/detekt.yml")
|
||||
// a way of suppressing issues before introducing detekt
|
||||
baseline = file("$rootDir/tools/detekt/baseline.xml")
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
|
Reference in New Issue
Block a user