Disable sonar rule - Lines should not be too long for C# project using DotSettings

1.7k Views Asked by At

We want to disable sonar inspection Lines should not be too long for our c# project. We already created DotSettings file where we customize some of the inspection rules. However we were not able to find option to disable rule lines not be too long using dotsettings. Can somebody let us know the workaround for the same.

1

There are 1 best solutions below

2
On BEST ANSWER

The SonarQube .NET integration pieces use Roslyn in the back. So every standard Roslyn tooling works with SonarLint or SonarC#. The rule activation can be controlled through .ruleset files, and not dotsettings. Note however, if you want to disable a given rule for all .NET projects, them you should do this change on your C# quality profile in SonarQube.