0

I've been struggling to exclude accessors in SonarQube v4.0. Everywhere I look I find the setting 'Seperate accessors'. If this is set to 'true' which is the default than the accessors should be excluded from code coverage.

However it doesn't seem to work.

I've already tried using Cobertura en JaCoCo as Code coverage plugin but neither of them seem to exclude the getters and setters.

My build is run by maven through Jenkins and it uses the 'Sonar Jenkins plugin' for analysis

wvp
  • 1,134
  • 5
  • 15
  • 28

1 Answers1

1

Excluding accessors from coverage is not the purpose of the 'exclude accessors' setting. This is only for metrics (should an accessor be counter as method).

In order to exclude getters and setters from coverage (which I won't necessarily recommend) you would need to configure your coverage tool, this has nothing to do with SonarQube.

benzonico
  • 10,635
  • 5
  • 42
  • 50