From ee09cd87628aad99df15bdf69343fecbf203a808 Mon Sep 17 00:00:00 2001 From: Razvan Codreanu <52859362+Schife@users.noreply.github.com> Date: Tue, 15 Oct 2019 15:49:31 +0100 Subject: [PATCH] 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 --- build.gradle | 2 +- detekt-baseline-config.yml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 detekt-baseline-config.yml diff --git a/build.gradle b/build.gradle index 074e3e5811..140ceb1653 100644 --- a/build.gradle +++ b/build.gradle @@ -448,7 +448,7 @@ task detektBaseline(type: JavaExec) { main = "io.gitlab.arturbosch.detekt.cli.Main" classpath = configurations.detekt 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 params = ['-i', input, '-c', config, '-b', baseline, '--create-baseline'] args(params) diff --git a/detekt-baseline-config.yml b/detekt-baseline-config.yml new file mode 100644 index 0000000000..05b7b01b04 --- /dev/null +++ b/detekt-baseline-config.yml @@ -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 \ No newline at end of file