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

Upgrade to PMD 6.12.0 #6536

Closed
pbludov opened this issue Mar 9, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@pbludov
Copy link
Collaborator

commented Mar 9, 2019

PMD 6.12.0 is released, pmd/pmd#1181 was fixed.

Blockers:

  • LinguisticNaming #6578
  • UseUnderscoresInNumericLiterals #6579

Bumping PMD version to 6.12.0 brings some new violations:

[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheckTest:493 Rule:LinguisticNaming Priority:3 Linguistics Antipattern - The variable 'isStarImport' indicates linguistically it is a boolean, but it is 'Method'.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.checks.javadoc.AbstractTypeAwareCheckTest:50 Rule:LinguisticNaming Priority:3 Linguistics Antipattern - The variable 'isSubclass' indicates linguistically it is a boolean, but it is 'Method'.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.checks.metrics.NPathComplexityCheck:64 Rule:LinguisticNaming Priority:3 Linguistics Antipattern - The field 'isAfterValues' indicates linguistically it is a boolean, but it is 'Deque'.

[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.api.JavadocTokenTypes:1225 Rule:UseUnderscoresInNumericLiterals Priority:3 Number 10000 should separate every third digit with an underscore.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.utils.CommonUtil:50 Rule:CyclomaticComplexity Priority:3 The class 'CommonUtil' has a total cyclomatic complexity of 77 (highest 8)..
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.api.DetailASTTest:288 Rule:UseUnderscoresInNumericLiterals Priority:3 Number 30000 should separate every third digit with an underscore.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.api.JavadocTokenTypesTest:126 Rule:UseUnderscoresInNumericLiterals Priority:3 Number 10000 should separate every third digit with an underscore.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.api.JavadocTokenTypesTest:127 Rule:UseUnderscoresInNumericLiterals Priority:3 Number 10071 should separate every third digit with an underscore.
(100 similar violations about numbers in JavadocTokenTypesTest skipped)

The rule LinguisticNaming can be fixed.
The rule UseUnderscoresInNumericLiterals should be configured to allow numbers up to 5 digits:
10081 is easy to read and looks better then 10_081; for 100500 it is better to change to 100_500 .

@rnveach

This comment has been minimized.

Copy link
Member

commented Mar 9, 2019

Number 10000 should separate every third digit with an underscore.

We have sevntu check for this.
https://github.com/checkstyle/checkstyle/blob/master/config/checkstyle_sevntu_checks.xml#L183
If we are going to fix the PMD violations for this, we should first enable the check. It must not be enabled right now, but I don't know if this is by design.

@rnveach

This comment has been minimized.

Copy link
Member

commented Mar 10, 2019

https://github.com/checkstyle/checkstyle/blob/master/config/version-number-rules.xml#L25-L30
When #5790 was fixed, upgrade suppression was never removed. We should upgrade to latest version regardless.

@romani romani added the approved label Mar 10, 2019

pbludov added a commit to pbludov/checkstyle that referenced this issue Mar 16, 2019

pbludov added a commit to pbludov/checkstyle that referenced this issue Mar 16, 2019

rnveach added a commit that referenced this issue Mar 16, 2019

@rnveach

This comment has been minimized.

Copy link
Member

commented Mar 16, 2019

Fix was merged

@rnveach rnveach closed this Mar 16, 2019

@rnveach rnveach added this to the 8.19 milestone Mar 16, 2019

Vantuz added a commit to Vantuz/checkstyle that referenced this issue Apr 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.