checkstyle / checkstyle/checkstyle

SummaryJavadoc: configuration to skip check for simple @return javadoc

Open
#3,925 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
9.6k
Forks
4.2k
Avg merge
22h 23m
Merged PRs (30d)
232

Description

Originally posted in #3908, it would be interesting to have a configuration option to skip the SummaryJavadoc check for certain fragments. Specifically, I'm interested in enabling this check but for trivial getters I want to allow just having a concise `@return blabla` javadoc:

```java
/**
* @return the category the article belongs to
*/
public Category getCategory() {
return category;
}
```

I could imagine that this can be made configurable by having a whitelisted javadoc tags config (if the javadoc just has a `@return`, it's fine) or maybe a regex pattern may be provided (if javadoc comment is `^@return .*`, skip the check).

Contributor guide

Open the contributing guide

Research direction

Start with the SummaryJavadoc check and review the original discussion in issue #3908. Define the supported configuration behavior for concise @return-only Javadoc, including how matching fragments are identified, and verify that the chosen behavior is covered by the check's tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.