Skip to content

Commit

Permalink
Implemented a custom Detekt rule for JUnit 5 @TestFactory functions…
Browse files Browse the repository at this point in the history
… that don't have a valid return type. Improved Detekt configuration.
  • Loading branch information
ianbrandt committed Sep 11, 2024
1 parent c7eb89d commit d71598f
Show file tree
Hide file tree
Showing 19 changed files with 432 additions and 1,117 deletions.
1 change: 1 addition & 0 deletions build-logic/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ dependencyResolutionManagement {
}

includeBuild("../platforms")
includeBuild("../detekt-rules")

rootProject.name = "build-logic"
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
plugins {
kotlin("jvm")
// Version catalog type-safe accessors and extension not yet available in
// plugins block of precompiled script plugins:
// https://github.com/gradle/gradle/issues/15383
// alias(libs.plugins.detekt.gradle.plugin)
id("io.gitlab.arturbosch.detekt")
}

dependencies {

detektPlugins("org.sdkotlin.detekt:detekt-rules:1.0-SNAPSHOT")
}

tasks {
named<Task>("check").configure {
this.setDependsOn(this.dependsOn.filterNot {
it is TaskProvider<*> && it.name == "detekt"
})

val detektMain by existing
dependsOn(detektMain)

val detektTest by existing
dependsOn(detektTest)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ plugins {
// https://github.com/gradle/gradle/issues/15383
// alias(libs.plugins.dependency.analysis.gradle.plugin)
id("com.autonomousapps.dependency-analysis")
// alias(libs.plugins.detekt.gradle.plugin)
id("io.gitlab.arturbosch.detekt")
// alias(libs.plugins.jvm.dependency.conflict.detection.gradle.plugin)
id("org.gradlex.jvm-dependency-conflict-detection")
id("org.sdkotlin.buildlogic.detekt-project")
}

val javaTargetVersion: String = JavaVersion.VERSION_21.toString()
Expand Down
Loading

0 comments on commit d71598f

Please sign in to comment.