TM-45 Make detektBaseline pass (#5561)

* TM-45 make the baseline generating task show a successful build regardless of the existing detekt violations

* TM-45 address PR feedback
This commit is contained in:
Razvan Codreanu 2019-10-15 15:49:31 +01:00 committed by Dominic Fox
parent 45172515ac
commit ee09cd8762
2 changed files with 7 additions and 1 deletions

View File

@ -448,7 +448,7 @@ task detektBaseline(type: JavaExec) {
main = "io.gitlab.arturbosch.detekt.cli.Main" main = "io.gitlab.arturbosch.detekt.cli.Main"
classpath = configurations.detekt classpath = configurations.detekt
def input = "$projectDir" def input = "$projectDir"
def config = "$projectDir/detekt-config.yml" def config = "$projectDir/detekt-config.yml, $projectDir/detekt-baseline-config.yml"
def baseline = "$projectDir/detekt-baseline.xml" def baseline = "$projectDir/detekt-baseline.xml"
def params = ['-i', input, '-c', config, '-b', baseline, '--create-baseline'] def params = ['-i', input, '-c', config, '-b', baseline, '--create-baseline']
args(params) args(params)

View File

@ -0,0 +1,6 @@
#Detekt 1.0.1
#Gradle task detektBaseline would always fail due to the fact that the existing baseline would not be taken into
#account so existing issues flare up. We set the max issues allowed to a high number to force detekt to pass when
#generating a baseline.
build:
maxIssues: 9999999