Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[apex] ApexDoc checks for structure but not content #3376

Open
jonathanwiesel opened this issue Jul 2, 2021 · 0 comments
Open

[apex] ApexDoc checks for structure but not content #3376

jonathanwiesel opened this issue Jul 2, 2021 · 0 comments
Labels
a:false-negative PMD doesn't flag a problematic piece of code

Comments

@jonathanwiesel
Copy link
Contributor

jonathanwiesel commented Jul 2, 2021

Affects PMD Version:
6.8+
7.0.0

Rule:

ApexDoc

Description:

Currently the rule only enforces that the comment structure is present but not that each token has a value describing it (making the needed documentation still invalid), I've seen this especially when developers use extensions that automatically creates the empty boilerplate doc structure.

Code Sample demonstrating the issue:

/**
 * @description
 */
public class Foo {

    /**
     * @description
     * @param  baz
     * @return
     */
    public String bar(String baz) {
        return null;
    }
}

Expected outcome:

The above code has the needed structure and tokens but no content to describe them, yet PMD still consider it valid according to the current rule.

Running PMD through: Apex PMD VSCode Extension

@jonathanwiesel jonathanwiesel added the a:false-negative PMD doesn't flag a problematic piece of code label Jul 2, 2021
@jsotuyod jsotuyod added the needs:pmd7-revalidation The issue hasn't yet been retested vs PMD 7 and may be stale label Mar 17, 2024
@jsotuyod jsotuyod removed the needs:pmd7-revalidation The issue hasn't yet been retested vs PMD 7 and may be stale label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:false-negative PMD doesn't flag a problematic piece of code
Projects
None yet
Development

No branches or pull requests

2 participants