Closed schauersbergern closed 5 years ago
I couldn't reproduce your problem. Can you please post your Gradle config which relates to configuring detekt?
I have set up a minimal detekt project, Here is the config: https://github.com/schauersbergern/detektMinimalSetup/blob/master/build.gradle
Note: Highlighting cannot be suppressed for the files in the excludes, e.g test, androidTest
So you are using the Detekt IntelliJ plugin, right? https://github.com/arturbosch/detekt-intellij-plugin
Yes, thanks for the hint, I have filed the issue in the plugin repo
Expected Behavior
When in the detekt-config.yml a file or path is excluded for a rule, the line which violates the rule should not be highlighted
Observed Behavior
When in the detekt-config.yml a file or path is excluded for a rule, the line which violates the rule is still highlighted
Steps to Reproduce
open a .kt class, add function:
suspend fun testfun() { var counter = 0
in detekt-config.yml add
SpreadOperator: active: true excludes: "**/path/to/file"
after detekt check, the line doParallel(*tasks) is still highlighted with error color and error "SpreadOperator: Using a spread operator causes a full copy of the array to be created before calling a method has a very high performance penalty." is displayed
Context
We wand to accomplish the same behaviour of visual plugin inspection and authomatic gradle inspection
Your Environment