We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Affects PMD Version: 6.33.0
Rule: PrematureDeclaration
Description:
Don't report variables that are not used at all. Those should be left to UnusedLocalVariable.
Code Sample demonstrating the issue:
public String wrongEscapeSequences() { final String r1 = "\u0008"; // unused var - not a premature declaration return "\u000csssdfsd"; }
(from https://github.com/checkstyle/checkstyle/blob/checkstyle-8.10/src/it/resources/com/google/checkstyle/test/chapter2filebasic/rule232specialescape/InputIllegalTokenText.java#L17)
Expected outcome:
The text was updated successfully, but these errors were encountered:
This has been fixed with PMD 7.0.0-rc1.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Affects PMD Version: 6.33.0
Rule: PrematureDeclaration
Description:
Don't report variables that are not used at all. Those should be left to UnusedLocalVariable.
Code Sample demonstrating the issue:
(from https://github.com/checkstyle/checkstyle/blob/checkstyle-8.10/src/it/resources/com/google/checkstyle/test/chapter2filebasic/rule232specialescape/InputIllegalTokenText.java#L17)
Expected outcome:
The text was updated successfully, but these errors were encountered: