4

I want to ignore generated Java source code files. Not by file or module name, but by some "signal text" in the file itself. E.g. when the source code file contains a comment/line saying

/**
* This file was auto-generated from WSDL
* by the IBM Web services WSDL2Java emitter.
* cf10631.06 v81706232132
*/

Even better would be to count all lines of code of such files as generated lines of code.

I only found this article by now.

Any ideas how to approach this? Any pointers are appreciated.

Community
  • 1
  • 1
Bernd
  • 370
  • 4
  • 16

1 Answers1

3

This is not currently possible. You can follow and vote for https://jira.sonarsource.com/browse/SONAR-4972.

EDIT: Issue was closed with "Won't fix" as "the effort is to be done on each language plugin".

For now, you can only ignore issues on generated files: http://docs.sonarqube.org/display/SONAR/Narrowing+the+Focus#NarrowingtheFocus-IgnoreIssues

AdrienW
  • 3,092
  • 6
  • 29
  • 59