A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/4201 below:

[java] CommentDefaultAccessModifier should consider lombok's @Value · Issue #4201 · pmd/pmd · GitHub

Affects PMD Version:6.51.0

Rule: CommentDefaultAccessModifier

Please provide the rule name and a link to the rule documentation:
https://pmd.github.io/latest/pmd_rules_java_codestyle.html#commentdefaultaccessmodifier

Description:
In the following code example, annotation @Value can add modifiers to the field fo$o, contradicted with default access modifier, so that no need to add a comment before its declaration, and this is a false positive.

Code Sample demonstrating the issue:

import lombok.Value;
@Value
public class Test {
    int fo$o;
}

Expected outcome:

PMD reports a violation at line 4, but that's wrong. That's a false positive.

Running PMD through: CLI


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4