New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #12520: removes missing package-info Javadoc check in JavadocStyle #12521
Conversation
8b578e0
to
2c02c7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://checkstyle.org/config_javadoc.html#MissingJavadocPackage
Checks for missing Javadoc comments in package-info.java files.
we need to update description to mention that this Check does only package javadoc. If any type are declared in such file in addition, they will not be validated.
But in this case validation of other types in package-info.java should be on JavadocStyle. can we keep this easily ? or we can create separate issue to cover this very rare usage of code.
items:
src/test/java/com/puppycrawl/tools/checkstyle/utils/CheckUtilTest.java
Outdated
Show resolved
Hide resolved
...rces/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocstyle/bothfiles/package-info.java
Outdated
Show resolved
Hide resolved
Done.
Please see my change to the package-info as part of JavadocStyle's test. It is still validating the file, and everything it was before, it is just specifically removing the check if a javdoc is missing. |
ac04040
to
de4ab04
Compare
https://app.circleci.com/pipelines/github/checkstyle/checkstyle/16604/workflows/083adf23-1c23-4b3c-92af-f2525931c94b/jobs/216874
I already repushed and rebased on master. |
de4ab04
to
bcf5dc9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Items
...rces/com/puppycrawl/tools/checkstyle/checks/javadoc/javadocstyle/bothfiles/package-info.java
Show resolved
Hide resolved
bcf5dc9
to
09290a6
Compare
@nrmancuso ping
I remember an issue of this. (#12186) |
09290a6
to
b7856b9
Compare
b7856b9
to
7cb39cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok to merge
Github, generate site |
7cb39cd
to
ff20137
Compare
rebased on latest master |
Github, generate site |
Restarted pitest-common, looks like random failure. |
Al CI failures are known (Travis and XML issues) |
Issue #12520
Regression: http://rveach.no-ip.org/checkstyle/regression/319/
Please note, configuration was created to show that with the functionality removed is exactly the same as
MissingJavadocPackage
. The extra properties added were to allow regression to see them as the same to remove duplicates and trim the report.http://rveach.no-ip.org/checkstyle/regression/319/checkstyle/index.html#A1
Is an example of a false negative as the old check was not identifying javadocs in the correct location.
http://rveach.no-ip.org/checkstyle/regression/319/checkstyle/index.html#A2
Is an example of a false positive as the new check only verifies the package has a styled javadoc. This was only being picked up by JavadocStyle as it saw there was no javadoc and it was in a package-info file, which it probably shouldn't have been doing. Basically the check if looking at all token types in the file even if they weren't a package definition. There are other "missing" checks which should handle this case, so there should be nothing lost in the end.
property still in use by other Checks