Fischer Ludrian
Fischer Ludrian

Reputation: 677

Exclude Sonarqube's duplicate code check between two specific classes

I use Sonarqube with Jenkins to check various violations. There are two classes, A and B, that have a lot of duplicated code. I know that and accept that. Therefore, I'd like to ignore these violations. However, I still want to be informed about the duplicated code from other classes, like C. I just want to ignore the duplicated code between A and B. How can I do that?

Upvotes: 5

Views: 13870

Answers (1)

Benoit
Benoit

Reputation: 5394

You can resolve the issue as false positive. This will make this issue disappear from your dashboard:

  • Select the issue
  • Click on Bulk change > Selected issue(s)
  • Choose Transition, Resolve as false positive
  • Apply

That's it.

Upvotes: 0

Related Questions