How can I configure my sonarqube analysis to ignore my getters and setters and not count them as duplicated line. Because I have them both on my entites and on my DTO class. So the duplications % is up to 15%.
Thanks in advance.
How can I configure my sonarqube analysis to ignore my getters and setters and not count them as duplicated line. Because I have them both on my entites and on my DTO class. So the duplications % is up to 15%.
Thanks in advance.
Unfortunately, sonar do not provide many rules about getter/setter :

You can configure which files will be reviewed by sonarqube. This could be an exclusion by package or by class name.
For instance, you can exclude com.company.business.plip.dto by adding this to your sonar-project.properties :
sonar.exclusions=src/main/java/com/company/business/plip/dto/**
Considering your dto are just empty shells, containing only privated fields and getters/setters ; this wouldn't cause a huge impact to your code coverage.