Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Number of attachments :
Description
Would you be willing to consider whether any support can be added for excluding code that is annotated with javax.annotation.Generated?
For example, if a .java file contains a public class that is annotated @Generated, perhaps the whole file would be excluded from checks - if a suitable parameter was set in the POM.
Thanks!
N.B. The difference between this (feature request in the mvn-checkstyle-plugin) and the 'upstream' feature request (2836054) could be that in the former case, the underlying checkstyle code would not even see any generated .java files, because Maven would exclude them. Arguably, in the latter case, Checkstyle would look inside every .java file, and only ignore those program elements with the annotation. So Checkstyle would still always process rules on parts of the file that can't be annotated - such as import statements.
(Also, 2836054 is nearly 3 years old.)