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

P21 conflicts with PMD rules #552

Open
g4s8 opened this issue Jul 21, 2020 · 1 comment
Open

P21 conflicts with PMD rules #552

g4s8 opened this issue Jul 21, 2020 · 1 comment

Comments

@g4s8
Copy link

g4s8 commented Jul 21, 2020

The pattern P21 says:

Description: All variable we need have to be declared at the beginning of its scope. If variable declared inside the scope following after logical blocks we consider that this is the pattern.

It contradicts with existing PMD rule PrematureDeclaration:

Avoid declaring a variable if it is unreferenced before a possible exit point.

If I fix Aibolit P21 issue, then PMD will complain.

@lyriccoder
Copy link
Member

@yegor256 comment pls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants