forked from 47degrees/helios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdetekt.gradle
40 lines (35 loc) · 1.49 KB
/
detekt.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
repositories {
mavenCentral()
maven { url "http://dl.bintray.com/arturbosch/code-analysis" }
configurations {
detekt
}
task detekt(type: JavaExec) {
group = "verification"
main = "io.gitlab.arturbosch.detekt.cli.Main"
classpath = configurations.detekt
def input = "$project.projectDir.absolutePath"
def config = "$project.projectDir/detekt.yml"
def reports = "helios:$project.projectDir.absolutePath/reports/report.detekt"
def baseline = "$project.projectDir.absolutePath/reports/baseline.xml"
def filters = ".*test.*"
def params = ["-i", input, "-c", config, "-f", filters, "-r", reports, "-b", baseline]
args(params)
}
task detektEstablishAcceptedErrors(type: JavaExec) {
group = "verification"
main = "io.gitlab.arturbosch.detekt.cli.Main"
classpath = configurations.detekt
def input = "$project.projectDir.absolutePath"
def config = "$project.projectDir/detekt.yml"
def reports = "helios:$project.projectDir.absolutePath/reports/report.detekt"
def baseline = "$project.projectDir.absolutePath/reports/baseline.xml"
def filters = ".*test.*"
def params = ["-i", input, "-c", config, "-f", filters, "-r", reports, "-b", baseline, "-cb"]
args(params)
}
dependencies {
detekt "io.gitlab.arturbosch.detekt:detekt-cli:1.0.0.RC9"
detekt "io.gitlab.arturbosch.detekt:detekt-formatting:1.0.0.RC9"
}
}