Clayton Walker
03/05/2025, 9:12 PMVampire
03/05/2025, 10:34 PM@Generated
that is visible to the consuming tool (if it has source retention and a tool operates on the bytecode this would not work for example).
JaCoCo for example automatically excludes any code with an annotation with simple name Generated
by default iirc.
So all tools that generate code should optimally mark it accordingly, and all tools that care about whether to operate on generated code should support some way to configure exclusions based on annotations. For a code formatter/validator even a source-retention annotation like javax.annotation.Generated
or javax.annotation.processing.Generated
should be enough as it is operating on the sources anyway.Vampire
03/05/2025, 10:35 PMClayton Walker
03/05/2025, 11:00 PM