Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Tune detekt config (#2579)
Browse files Browse the repository at this point in the history
* Update detekt config for compose

Updated according to
https://detekt.dev/docs/introduction/compose/

* Update detekt baseline

* Fix detektFormat task

For some reasons, detektFormat doesn't work. No files was passed lol...
  • Loading branch information
rougsig authored Sep 4, 2023
1 parent cb263a0 commit 64fa4ee
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1,039 deletions.
11 changes: 4 additions & 7 deletions buildSrc/src/main/kotlin/ivy.lint.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,11 @@ plugins {
}

configure<DetektExtension> {
val filesToCheck: String? = System.getProperty("detekt.filesToCheck")
if (!filesToCheck.isNullOrEmpty()) {
source.setFrom(filesToCheck.split(","))
} else {
source.setFrom(projectDir)
}
source.setFrom(projectDir)
config.setFrom("$rootDir/config/detekt/config.yml")
baseline = file("$rootDir/config/detekt/baseline.yml")
}


tasks.register<Detekt>("detektFormat") {
autoCorrect = true
}
Expand All @@ -25,6 +19,9 @@ tasks.withType<Detekt> {
// Disable task caching
outputs.upToDateWhen { false }

val filesToCheck: String? = System.getProperty("detekt.filesToCheck")
setSource(filesToCheck?.split(",") ?: projectDir)

reports {
html.required.set(true)
sarif.required.set(false)
Expand Down
Loading

0 comments on commit 64fa4ee

Please sign in to comment.