xdoclet

Java files generated from xDoclet marked as Critical category by Sonar


Team , We are using xDoclet to generate classes runtime. Sonar reports all classes in Critical category because of rules violation / some Java standards are not adhered in classes generated by xDoclet.

This classes are generated automatically hence xDOCLET gives message on first line "Do not modified class , its autogenerated"

Whenever we resolved issues in classes and run sonar then its again come in Critical category as at the time of build , xDoclet remove old classes and generate again.

We dont want to updated all issues marked as False Positive and we are using legacy business critical system which is running since 7-9 years so do not wants to remove xDoclet at this time.

Please suggest the approach.

Looking forward to great support and cooperation


Solution

  • Received answer from other group.

    You may want to exclude those generated files from the analysis : see documentation about this : http://docs.sonarqube.org/display/SONAR/Narrowing+the+Focus

    Its working.