Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SonarQube - duplicated block, how to change configuration

Tags:

java

sonarqube

SonarQube shows me this kind of duplication:

1   package pl.com.bernas.ioz.user.domain;
2   
3   import java.io.Serializable;

This is not desired behaviour.

Can I disable this kind of duplication? But I don't want to disable duplication rule at all, or add class to ignore. Can I ignore just this particular case?

like image 564
KirkoR Avatar asked Nov 11 '22 02:11

KirkoR


1 Answers

As far as I know you can't exclude only this type of duplication from your analyse. You can only exclude the whole file from your analyse, but this is not a good idea. Maybe you can try out the SourceMeter plugin for SonarQube. It has a bit more sophisticated duplication finder. You can find an online demo here.

like image 109
L. Langó Avatar answered Nov 14 '22 23:11

L. Langó