Is there a possibility in eclipse to exclude the test sources of a maven project from the sonar analysis when running a local analysis?
Test code uses a lot more hard coded values than production code. So there are plenty of warnings, which say a constant should be used instead. But always using constants is in many cases redundant in test sources. I don’t want to remove the rule, because this is necessary for production code.
There is an open improvement for sonar that would add the functionality I would like to have. See http://jira.codehaus.org/browse/SONAR-2760
EDIT:
As of Sonar 3.5 the mentioned improvement has been implemented and is available.