detektのレポート出力先の変更
This commit is contained in:
parent
19c5ba0746
commit
ecee8a3d2c
|
@ -1,3 +1,6 @@
|
||||||
|
import io.gitlab.arturbosch.detekt.Detekt
|
||||||
|
import io.gitlab.arturbosch.detekt.DetektPlugin
|
||||||
|
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
@ -296,29 +299,19 @@ detekt {
|
||||||
|
|
||||||
// point to your custom config defining rules to run, overwriting default behavior
|
// point to your custom config defining rules to run, overwriting default behavior
|
||||||
config = files("$rootDir/config/detekt/config.yml")
|
config = files("$rootDir/config/detekt/config.yml")
|
||||||
|
}
|
||||||
|
|
||||||
// detekt 1.19.0 でレポート出力先を指定できなくなった?
|
plugins.withType(DetektPlugin) {
|
||||||
// app/build/reports/detekt に出力されてる
|
tasks.withType(Detekt) {
|
||||||
reports {
|
reports {
|
||||||
// checkstyle like format mainly for integrations like Jenkins
|
xml.required.set(true)
|
||||||
xml {
|
xml.outputLocation = file("$buildDir/reports/detekt/st-${name}.xml")
|
||||||
enabled = true
|
html.required.set(true)
|
||||||
destination = file("detektReport/${name}.xml")
|
html.outputLocation = file("$buildDir/reports/detekt/st-${name}.html")
|
||||||
}
|
txt.required.set(true)
|
||||||
// observe findings in your browser with structure and code snippets
|
txt.outputLocation = file("$buildDir/reports/detekt/st-${name}.txt")
|
||||||
html {
|
sarif.required.set(true)
|
||||||
enabled = true
|
sarif.outputLocation = file("$buildDir/reports/detekt/st-${name}.sarif")
|
||||||
destination = file("detektReport/${name}.html")
|
|
||||||
}
|
|
||||||
// similar to the console output, contains issue signature to manually edit baseline files
|
|
||||||
txt {
|
|
||||||
enabled = true
|
|
||||||
destination = file("detektReport/${name}.txt")
|
|
||||||
}
|
|
||||||
// standardized SARIF format (https://sarifweb.azurewebsites.net/) to support integrations with Github Code Scanning
|
|
||||||
sarif {
|
|
||||||
enabled = true
|
|
||||||
destination = file("detektReport/${name}.sarif")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue