RobertRPM
RobertRPM

Reputation: 137

Sonarqube restriction of a rule

I have set SonarQube to manage code quality on my project, but I have this issue: On tests projects I don't want to run this rule:

Source files should have a sufficient density of comment lines common-cs:InsufficientCommentDensity

How can I do this? I tried to add in Issues-> Ignore Issues in Blocks: Regular Expression for start of the block with the pattern

using NUnit.Framework;

But no success, the rule is still appearing on test files.

Upvotes: 2

Views: 2296

Answers (1)

Teryk - SonarSource
Teryk - SonarSource

Reputation: 994

Ticket created. Meanwhile, you can either:

  • deactivate the rule completely
  • mark the issues flagged as won't fix
  • set an exclusion on test files for all issues

Upvotes: 2

Related Questions