sonar-detekt icon indicating copy to clipboard operation
sonar-detekt copied to clipboard

Cannot change threshold values in Sonar rules

Open vsigler opened this issue 4 years ago • 2 comments

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.

vsigler avatar Jan 12 '21 13:01 vsigler

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.

arturbosch avatar Jan 16 '21 21:01 arturbosch

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?

vsigler avatar Jan 18 '21 07:01 vsigler