Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up detekt baseline from generated classes #6332

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask

plugins {
id(Dependencies.Plugin.dependencyCheckId) version Versions.Plugin.dependencyCheck apply false
Expand Down Expand Up @@ -34,7 +35,10 @@ val baselineFile = file("$rootDir/config/baseline.xml")
val configFile = files("$rootDir/config/detekt.yml")

val projectSource = file(projectDir)
val buildFiles = "**/build/**"
val detektExcludedPaths = listOf(
"**/build/**",
"**/mullvad_daemon/management_interface/**",
)

detekt {
buildUponDefaultConfig = true
Expand All @@ -49,7 +53,12 @@ detekt {

tasks.withType<Detekt>().configureEach {
// Ignore generated files from the build directory, e.g files created by ksp.
exclude(buildFiles)
exclude(detektExcludedPaths)
}

tasks.withType<DetektCreateBaselineTask>().configureEach {
// Ignore generated files from the build directory, e.g files created by ksp.
exclude(detektExcludedPaths)
}

allprojects {
Expand Down
Loading
Loading