Dynamically set input files with Detekt Gradle Plugin #5454
-
Is there a way to dynamically set input files (like --input param for CLI) but with Gradle plugin? My goal is to only scan files which have been changed on a specific branch, so I am using some |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I just found out how to apply custom plugins for CLI and configure custom reports. That was my initial reason to use the gradle plugin. Now that I can use all the necessary things with CLI, I can simply use the |
Beta Was this translation helpful? Give feedback.
-
A word of warning: if you're running Detekt with type resolution, the changed files don't cover the files that could trigger new Detekt findings. e.g. file1.kt fun f(): List<String> = TODO("implementation omitted for brevity") file2.kt class c {
var list = f()
} PR changes file1.kt: -fun f(): List<String> = TODO("implementation omitted for brevity")
+fun f(): MutableList<String> = TODO("implementation omitted for brevity")
|
Beta Was this translation helpful? Give feedback.
I just found out how to apply custom plugins for CLI and configure custom reports. That was my initial reason to use the gradle plugin. Now that I can use all the necessary things with CLI, I can simply use the
--input
param. So this question is kinda obsolete.