How to exclude getter/setter methods from test coverage in sonar clover plugin?

4.3k Views Asked by At

We use Jenkins CI with Sonar for test coverage. We use Atlassian Clover as coverage tool. So the question: how to exclude getter/setter methods from test coverage in order to increase test coverage percent without writing useless test cases? I have tried to make some changes in Settings->General Settings->Clover and Settings->General Settings->Java sections but without any success. As I understand I need to apply something like (.* )?public .(get|set|is)[A-Z0-9]. but I don't know where should I put this expression.

1

There are 1 best solutions below

0
On

http://jira.codehaus.org/browse/SONAR-766 is currently planned for version 4.1. Feel free to watch it.