`NotJavadoc` pattern should allow Javadoc comments on local classes
- Dominant language
- Java
- Stars
- 7.2k
- Forks
- 820
- Avg merge
- 5h 9m
- Merged PRs (30d)
- 50
Description
Currently the `NotJavadoc` bug pattern explicitly disallows Javadoc-style comments on local classes ([relevant code](https://github.com/google/error-prone/blob/c2b71f9d1ef980c8e7acc3d2801eaf2d1fe28e7a/core/src/main/java/com/google/errorprone/bugpatterns/javadoc/NotJavadoc.java#L89)?).
White this might be 'correct' from the standpoint that these classes will not be visible in the generated HTML documentation. There might still be value in adding a documentation comment (instead of a normal block comment) to these classes for development purposes, similar to how you might add Javadoc comments to `private` methods even though they are not listed by default in the HTML documentation either.
Eclipse does support Javadoc comments on local classes and shows their content when you hover over the class name and in the "Javadoc" view.
IntelliJ however does not not recognize it as Javadoc comment and shows a "Dangling Javadoc comment" warning. Have created [IDEA-320220](https://youtrack.jetbrains.com/issue/IDEA-320220) to clarify if that is intended.
For the JDK it might also be planned to add a Xlint for dangling doc comments, see [JDK-8303689](https://bugs.openjdk.org/browse/JDK-8303689), though it is not clear how it would treat this case.
Or, what was your motivation for not allowing Javadoc on local classes?
Contributor guide
Assessment
This issue has not been assessed yet.