SonarLint analyser/config file parameter name discrepancies

I have been attempting to set up SonarLint with VS2022 using the extension. After connecting to our SonarQube server/project I get linting as expected. However, I noticed that rule csharpsquid:S134 was not using the parameter value we had set. The default value was 3, which the analyser was picking up, but we had set it to 5. Checking the SonarLint.xml file I can see that the parameter value is indeed correct:


After doing some digging it appears that the reason this isn’t picked up is because the Key name “max” above in the config is not the same as the RuleParameter(“maximumNestingLevel”… in FunctionNestingDepthBase.cs.

I don’t know if other rules have a similar issue, but if I change “max” to “maximumNestingLevel” the value of 5 does then get picked up by the analyser. I’m assuming this is a bug, unless it’s to do with mismatched versions?

Operating system: Windows 10
Visual Studio version: VS2022
SonarLint plugin version:
Programming language you’re coding in: C#/JS/C++
Is connected mode used: Yes
Connected to SonarQube: 8.9.1


Your SonarQube version is past EOL, and this problem is fixed in the latest version. You should upgrade SonarQube to the latest version at your earliest convenience. Your upgrade path is:

8.9.1 → 9.9.4 → 10.5.1

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.