From 21ce8100ca921e5e18fe9e669c1d4e31f6979201 Mon Sep 17 00:00:00 2001 From: "Cuong M. Tran" Date: Sat, 16 Mar 2024 07:35:39 +0700 Subject: [PATCH] Update detekt's baseline & run detekt for future build (#1106) * Update detekt baseline from mihon * Update detekt baseline to current code & enable gradle's detekt task for future build # Conflicts: # .github/workflows/build_push.yml # config/detekt/baseline.xml --- buildSrc/src/main/kotlin/detekt.gradle.kts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/buildSrc/src/main/kotlin/detekt.gradle.kts b/buildSrc/src/main/kotlin/detekt.gradle.kts index 986138ee63..5037d7cc9c 100644 --- a/buildSrc/src/main/kotlin/detekt.gradle.kts +++ b/buildSrc/src/main/kotlin/detekt.gradle.kts @@ -29,6 +29,18 @@ detekt { baseline = file(baselineFile) } +val detektProjectBaseline by tasks.registering(DetektCreateBaselineTask::class) { + description = "Overrides current baseline." + buildUponDefaultConfig.set(true) + ignoreFailures.set(true) + parallel.set(true) + setSource(files(rootDir)) + config.setFrom(configFile) + baseline = file(baselineFile) + include(kotlinFiles) + exclude(resourceFiles, buildFiles, generatedFiles, scriptsFiles) +} + tasks.withType().configureEach { include(kotlinFiles) exclude(resourceFiles, buildFiles, generatedFiles, scriptsFiles)