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
UnusedLocalVariable does not support local classes #14092
Comments
Scoping local classes is difficult for the current check logic as local classes can have |
Hi, is anyone working on this right now? If not, consider I am on it. |
…rt local classes" This reverts commit 8c27c6d.
I have read check documentation: https://checkstyle.sourceforge.io/checks/coding/unusedlocalvariable.html#UnusedLocalVariable
I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run
I have executed the cli and showed it below, as cli describes the problem better than 1,000 words
Describe what you expect in detail.
I expect a violation to be thrown for both the local variables. The check currently has no logic for scoping local classes, which is the root cause of this false negative. There might be cases where lack of this support might give a false positive.
The text was updated successfully, but these errors were encountered: