jflex
jflex copied to clipboard
Add @Generated on generated code
In order to work around the error-prone fall-though violations in the generated code (#222), I tried using using -XepDisableWarningsInGeneratedCode.
Unfortunately this javac option only works if the generated code is annotated with @Generated.
Adding this annotation will create a dependency on 'javax.annotation:javax.annotation-api:jar' The current workaround which is with @SuppressWarnings #454 should be sufficient for now. I'll defer the decision about adding a dep on this annotation to 1.8 and let Gerwin make the call.
@lsf37 So actually, there is a problem using @SuppressWarnings on the class: There can be only one such annotation, which can be problematic if the custom header wants to define one.
There is now a mechanism for leaving out the default SuppressWarnings annotation, so I think we can close this one.