Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 686
Fischer Ludrian Avatar asked Nov 08 '22 02:11

Fischer Ludrian


1 Answers

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.

like image 161
Benoit Avatar answered Nov 13 '22 20:11

Benoit