"Optional parameters should not be used" error thrown in SonarQube analysis

782 Views Asked by At

I'm getting error - "Optional parameters should not be used" in Sonar analysis for C# project. Actually in C# latest version we can define optional parameter but SonarQube analysis says Optional parameters should not be used. How can I solve this issue? I'm using latest SonarQube version 6.0.

1

There are 1 best solutions below

4
On

You can either deactivate the rule on your SonarQube server or mark it as False Positive for your particular case but I would recommend you to have a look at why we created this rule before you deactivate it. You can find more information about this rule on our Rules website or on Microsoft website.