16

I try to use Sonar on a Java 7 project (which relies on new syntactic features) and the PMD part and the Checkstyle part fail to parse those files.

The Findbugs part fails to read Java 7 class files.

This causes Sonar to consider only 10% of my classes.

Can there be a workaround for this?

EDIT: There is an issue for Java 7 compatibility.
Please vote for this issue, so it will be fixed soon.

java.is.for.desktop
  • 10,748
  • 12
  • 69
  • 103
  • Can you not disable PMD rules? – Vineet Reynolds Aug 10 '11 at 22:10
  • @Vineet Reynolds, edited the question: everything else fails too. On source-files and class-files levels. – java.is.for.desktop Aug 11 '11 at 05:14
  • Yes, I believe this is going to be the case, until the upstream projects like PMD, Findbugs, Checkstyle et al can understand Java 7 syntax. Sonar has dependencies on these projects, so bugs like [these](http://sourceforge.net/tracker/?func=detail&aid=3327072&group_id=56262&atid=479921) have to be fixed first. – Vineet Reynolds Aug 11 '11 at 05:31
  • 7
    I confirm that Java7 will be fully supported in Sonar 2.12. Patches have been sent to Checkstyle and PMD teams. Findbugs already supports Java7. – Simon Brandhof Sep 24 '11 at 07:24

1 Answers1

1

You could try to make findbugs dev build manually and put it into sonar. Not the easiest way.

svn checkout http://findbugs.googlecode.com/svn/trunk/findbugs
Gray
  • 115,027
  • 24
  • 293
  • 354
Vladislav Bauer
  • 952
  • 8
  • 19