SonarQube - duplicated block, how to change configuration

淺唱寂寞╮ 提交于 2019-12-12 10:48:21

问题


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:


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.



来源:https://stackoverflow.com/questions/25722335/sonarqube-duplicated-block-how-to-change-configuration

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!