-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
VariableDeclarationUsageDistance throws NPE on empty switch statements #11973
Comments
On it. Documentation on property Also, do we expect violation in the following code when using your configuration, i suppose no as well? public class Test {
void method() {
int i = -1;
switch (i) {
}
}
} |
No, we do not expect violation in both cases, empty lines do not count in declaration distance. In both cases, the distance between declaration and usage is 0. |
Closed via #12052 |
Awesome work @stoyanK7 |
…eDeclarationUsageDistance
I have read check documentation: https://checkstyle.org/config_coding.html#VariableDeclarationUsageDistance
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
The text was updated successfully, but these errors were encountered: