Parameter changes not applied for Cognitive Complexity rule

Hi,

I have reset the value of Property threshold and threshold for the below rule for quality profile of my organization :

But the change is not reflecting in issues. Tried multiple times. Could someone please suggest on this?
Thanks!!

Hi,

Let’s start by verifying a few things:

  • You say you reset the parameter values. Are you sure you did it for the profile with which your project is analyzed?
  • Are you sure you re-analyzed the project after updating the rule?

 
Ann

Hi Ann,

Thanks for the reply.
I have verified it and results are as follow:

  1. The profile for which we have set the rule(parameter value) is C# and our project is analyzing that profile.
  2. Yes, we have re-analyzed the project and it is still appearing.
    Could you please suggest?

Hi,

How about a screenshot of an issue you think should be closed? And also a screenshot of the activation section of your rule? E.G.

 
Ann

Hi Ann,

Please find the screenshot below:

Rule:

Hi,

Also, the screenshot for the issues in a project:

Hi @DGUCOM,

Could you check, on the build machine, the content of the file .sonarqube/conf/cs/SonarLint.xml? It should contain a block like the following and will have some values. Are those values the ones you expect (i.e. threshold: 60 and propertyThreshold: 30)?

<Rule>
  <Key>S3776</Key>
  <Parameters>
    <Parameter>
      <Key>threshold</Key>
      <Value>15</Value>
    </Parameter>
    <Parameter>
      <Key>propertyThreshold</Key>
      <Value>3</Value>
    </Parameter>
  </Parameters>
</Rule>

Cheers,
Amaury

Hi Amaury,

Thanks for the reply. I checked the file and output is not as expected. Please refer below:

<Rule>
  <Key>S3776</Key>
  <Parameters>
    <Parameter>
      <Key>threshold</Key>
      <Value>15</Value>
    </Parameter>
    <Parameter>
      <Key>propertyThreshold</Key>
      <Value>3</Value>
    </Parameter>
  </Parameters>
</Rule>

Hi @DGUCOM

Are you using sonarcloud :sonarcloud: and BitBucket pipelines? I believe a similar issue has been reported here and it has been fixed in February.

Thanks
Andrei