Sonarlint for VS 2.6 : changing threshold of rules

242 views
Skip to first unread message

dirk.v...@gmail.com

unread,
Sep 15, 2016, 4:01:46 AM9/15/16
to SonarLint
In SonarQube I have changed the default parameter (maximumFunctionComplexityThreshold) of the rule "Methods should not be too complex" from 10 to 20.
This is done for the correct quality profile. Sonarlint is still showing violations of this rule in the IDE like: "The cyclometic complexity of this method is 14 which is greater than 10".

Is it possible to sync this threshold to the ruleset (or at least fix this issue manually for the time being)?

TIA

Julien HENRY

unread,
Sep 20, 2016, 6:13:38 AM9/20/16
to SonarLint, dirk.v...@gmail.com
Hi,

Are you using the connected mode to bind your project with the one on SonarQube server? This is the way to get the same rule configuration in SonarLint than the one in SonarQube.

++

Julien

dirk.v...@gmail.com

unread,
Sep 20, 2016, 8:21:15 AM9/20/16
to SonarLint, dirk.v...@gmail.com
Yes, I am using the connected mode (at least I think I am :)). There are rulesets being synced and when I disable the rule in sonarQube, sonarlint is not showing this rule.
But changing the threshold parameter does not impact the rule in sonarlint. Any thoughts?

Op donderdag 15 september 2016 10:01:46 UTC+2 schreef dirk.v...@gmail.com:

tamas.vajk

unread,
Sep 20, 2016, 8:33:35 AM9/20/16
to SonarLint, dirk.v...@gmail.com
Hello,

Could you please verify that the parameters change if you restart VS after the sync?

Thanks,
Tamas

dirk.v...@gmail.com

unread,
Sep 21, 2016, 6:52:42 AM9/21/16
to SonarLint, dirk.v...@gmail.com
Hi Tamas,

How/Where can I verify that the parameters change? In VS you mean?

I was under the impression that parameters in VS cannot be set, as told here:

The problem is that the default threshold parameters are used/synced instead of the overruled parameters in the specific quality profile:


the screenshot shows the sonarqube settings. the highlighted quality profile rule should be synced, so I expect 24 (instead of 10).


When I restart VS I always get this message and I will update:


Is it common I always get this message, even when the rules arent changed?

TIA

Op dinsdag 20 september 2016 14:33:35 UTC+2 schreef tamas.vajk:

dirk.v...@gmail.com

unread,
Sep 26, 2016, 5:13:22 AM9/26/16
to SonarLint, dirk.v...@gmail.com
any thoughts? or what am I missing? TIA


Op dinsdag 20 september 2016 14:33:35 UTC+2 schreef tamas.vajk:
Hello,

Tamas Vajk

unread,
Sep 26, 2016, 5:29:18 AM9/26/16
to dirk.v...@gmail.com, SonarLint
Sorry for not coming back to you yet. I'm going to investigate this issue. 
The fact that the warning comes up about outdated analyzers somehow suggests me that the updates couldn't be downloaded in the first place, so that's why you can't see the parameter changes.
Could you also send us the content of the SonarLint output window?

Thanks,
Tamas

Tamas VAJK | SonarSource
Language Team

--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/7b9df266-390b-4f1a-b300-6d2a7611d99f%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages