I am learning to use Sonarqube 4.3.2 for my Maven based Java projects. I have things working pretty well, but cannot get the Generated Lines and Generated Lines of Code metrics to populate.
I would love this metric to track how much code out of the total a vendor actually has to manually code vs. generated code we provide via code generation. It would also help to see the various issues/statistics in general broken out by generated code vs. manual code.
At first I thought perhaps Sonarqube would automatically pick up that any code in the target/generated-sources folder and flag it as generated, but that doesn't appear to be working.
I have also tried to annotate the classes with the @javax.annotation.Generated
annotation, but this did nothing.
Is there something specifically I need to do to flag code as being generated?
Apparently, the generated lines and generated lines of code metrics are only populated by the COBOL plugin right now, even though they are visible/available for other types of projects :(.
Too bad, hopefully this will be implemented for the java ecosystem soon.