Skip to content

Require description and type on @throws tag #911

@ericcornelissen

Description

@ericcornelissen

Motivation

I would like to use this plugin to enforce the same on the use of @throws tags as I can enforce on @returns, @param, and @property tags. By that I mean, in addition to the require-throws rule I would like to see the rules:

  • require-throws-description: Requires that the @throws tag has a description value.
  • require-throws-type: Requires that @throws tag has type value.

Current behavior

The require-throws rule just enforces that the @throws tag is used. If the match-description rule is also used the description may be enforced as well.

Desired behavior

The plugin can be used to enforce:

  1. A description is provided for @throws (rather than the specific description format enforced by the match-description rule, similar to require-param-description etc.).
  2. A type is provided for @throws.

Alternatives considered

  1. Using the match-description rule to enforce a description on @throws.
  2. None

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions