Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
New MissingJavadocCheck(s) #5411
As discussed at #4983 (comment) ,
once we start converting old Java checks using Javadoc regular expression to Javadoc checks using grammar, we lose the functionality of reporting a violation on an item if a Javadoc is missing.
MissingDeprecated has an property
We can't remove these functionalities, so we need to split them into new check(s) that will remain as Java checks. Their only purpose will be to report a violation if a javadoc is needed.
We need to examine all these properties of our Java checks that examine Javadocs and decide how to best to split them out.
Once this is done we can complete #4983.
For JavadocType, functionality for validating missing javadocs was split into a new check MissingJavadocType.
There is also the UnusedImportCheck, which is both a java and a javadoc check.
Here is the basic idea:
rules/criteria for reporting violations for Class and Method could be very different.
We will need separate Check for this:
user should define by properties what is triggering validation.
existing MissingDeprecatedCheck should stay and become javadoc Check to trigger on each javadoc comment, check java annotation, and then search for javadoc tag and do match. New MissingJavadocMethodCheck should force user to write javadoc when annotation is present, to let on next launch trigger execution of MissingDeprecatedCheck. So it 2 launches of checkstyle all cases should be covered.
@rnveach , please share your ideas.
referenced this issue
Jan 6, 2018
Just for completeness, other tokens needed are: constructors (method), annotation definitions (type), enum constant definition (field), annotation field (field).
We recently added javadoc parsing on packages. I think we should have