Skip to content

Commit

Permalink
Update detekt's baseline & run detekt for future build (#1106)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
cuong-tran committed Mar 29, 2024
1 parent 2f7617d commit 21ce810
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions buildSrc/src/main/kotlin/detekt.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Detekt>().configureEach {
include(kotlinFiles)
exclude(resourceFiles, buildFiles, generatedFiles, scriptsFiles)
Expand Down

0 comments on commit 21ce810

Please sign in to comment.