detekt-intellij-plugin
detekt-intellij-plugin copied to clipboard
Apply Custom Rules YML voids all rules
With the latest plugin in Android Studio Dolphin, if I try to add a configuration file yml, and apply it. It appears that the rules are not applied and not even the default rules. This can be replicated simply enough by taking the default configuration file from:
https://raw.githubusercontent.com/detekt/detekt/main/detekt-core/src/main/resources/default-detekt-config.yml
And adding it as a Configuration file. Apply it, and then go to a file that you know has rules violations. No detekt rules are shown.
If you remove the file, and just go with the default from the plugin, then those rules are available and are applied as expected.
Add the custom rules back in and no detekt rules are shown.
I just did the same thing, and I'm seeing the same results with Intellij Ultimate 2022.2.3
I was able to get this working by using "Build rules upon default configuration"
and the following detekt.yml
which overrides maxIssues
and MaxLineLength
build:
maxIssues: 99999
style:
MaxLineLength:
active: true
maxLineLength: 140
excludePackageStatements: true
excludeImportStatements: true
excludeCommentStatements: false
excludeRawStrings: true
this will work for me, but it's not ideal that it doesn't work with the default config.
I also had to restart Intellij for the plugin to detekt the changes.
I'm seeing the same issue in AS Dolphin, plugin version 1.21.3-android
. The above fix didn't work for me, though.
I still have the same issue.
We have maxLineLength: 140
but the plugin still complains if we go past 120.
Any updates or workarounds?