-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[javascript] UnnecessaryBlock FP for function declaration #4129
Comments
EDIT: codacy using PMD : 6.48.0 |
I tried running on local environment and it reported as
|
Related to #2305. Probably |
PMD 7.0.0 won't produce a FP here regardless of where the |
unnecessary block
issue
Affects PMD Version: Not sure, in codacy it give since 5.0
Rule:
Please provide the rule name and a link to the rule documentation:
https://pmd.github.io/latest/pmd_rules_ecmascript_codestyle.html#unnecessaryblock
Description:
Created a named exported function that returns an object. This function is pushed to codacy.com which uses PMD. Codacy reports it as an unnecessary block. I am not sure if this false positive and what I am missing here.
Code Sample demonstrating the issue:
Expected outcome:
PMD reports a violation at line 188 in the screenshot, but that's wrong. That's a false positive.
Running PMD through: Codacy
The text was updated successfully, but these errors were encountered: