Sonar Maven plugin missing blame for generated files


We use the latest sonar maven plugin which complains about missing blame information for some files.
This is in general correct, but the folder is according to maven convention generated-source which by its nature does not have any blame information.
Would be great if this warning is suppressed for generated files which btw are excluded by .gitignore.

Missing blame information for the following files:
  * foo/target/generated-sources/annotations/bar/

Kind regards,

Hi @reitzmichnicht

You are correct this is indeed a bug in the SCM data processing of the scanner, but is not only effecting Maven. I have created to address this.


Thanks for creating a ticket. Looking forward to get my logs a bit more cleaned.

Files excluded in .gitignore should not be part of the analysis unless the parameter sonar.scm.exclusions.disabled is provided.

As added to the ticket we needed to enable this flag for a single reason:
Get correct code coverage metrics over the whole code of the product. As we use generated code, this code is normally not considered by Sonarqube when calculating the code coverage which is falsifying the results.

Kind regards,