Skip to content

[java] CommentRequired property names are inconsistent #1683

Closed

Description

@jsotuyod

CommentRequired calls the class-level JavaDoc comment a "header comment". Usually, the header comment is a top-level comment before the package declaration (ie: license).

The behavior should be aligned with the property name, and a new property be added, so we can configure and check both for header comments and class comments.

Activity

  1. added
    in:documentation
    good first issue
    on Feb 20, 2019
  2. adangel commented on Dec 17, 2019

    @adangel
    Member

    I've decided not to add a header/package comment requirement property for the following reasons (see #2069):

    We might introduce a new property "packageCommentRequired" in order to check for formal
    comments for packages. However, this is completely different:

    • package javadoc comments are not in every file, but only in the file package-info.java
    • if the file package-info.java doesn't exist, we won't analyze it, so we can't require this comment
    • the only check we could do here is "Unwanted"
    • So, I'm not sure, whether checking for package comments makes sense at all?

    The rule is only about javadoc/formal comments. license comments should actually not be a javadoc comment.

  3. added this to the 6.21.0 milestone on Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issuein:documentation

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions