SonarQube - duplicated block, how to change config

2019-06-23 10:04发布

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?

1条回答
等我变得足够好
2楼-- · 2019-06-23 10:43

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.

查看更多
登录 后发表回答