detekt / sonar-detekt

SonarQube plugin for Kotlin
https://detekt.dev
GNU Lesser General Public License v3.0
493 stars 52 forks source link

Cannot change threshold values in Sonar rules #136

Open vsigler opened 3 years ago

vsigler commented 3 years ago

This might be a bug or it might be an unimplemented feature. However, I cannot seem to be able to configure detekt rules.

Example: https://detekt.github.io/detekt/complexity.html#toomanyfunctions This rule has multiple thesholds to configure. However it cannot be done when I add the rule to a quality profile.

Similar rules for java have a "change" option that allows me to tune the thresholds.

arturbosch commented 3 years ago

Hi @vsigler , indeed we do not support this feature. detekt rules are configured via our yaml format - https://detekt.github.io/detekt/configurations.html You can reference the yaml config file in your project detekt settings.

vsigler commented 3 years ago

Problem is that while I have admin access to Sonar, I do not have direct filesystem access to the server, so this makes things a bit cumbersome. Per project settings in individual repositories are not an option either. Would it be at least somehow possible to add a way to edit the default settings in a text area in the plugin?