Skip to content

Commit ee09cd8

Browse files
Schifer3domfox
authored andcommitted
TM-45 Make detektBaseline pass (corda#5561)
* TM-45 make the baseline generating task show a successful build regardless of the existing detekt violations * TM-45 address PR feedback
1 parent 4517251 commit ee09cd8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ task detektBaseline(type: JavaExec) {
448448
main = "io.gitlab.arturbosch.detekt.cli.Main"
449449
classpath = configurations.detekt
450450
def input = "$projectDir"
451-
def config = "$projectDir/detekt-config.yml"
451+
def config = "$projectDir/detekt-config.yml, $projectDir/detekt-baseline-config.yml"
452452
def baseline = "$projectDir/detekt-baseline.xml"
453453
def params = ['-i', input, '-c', config, '-b', baseline, '--create-baseline']
454454
args(params)

detekt-baseline-config.yml

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

0 commit comments

Comments
 (0)