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 PMD to 6.17.0 #6868

Closed
rnveach opened this issue Jul 3, 2019 · 4 comments

Comments

@rnveach
Copy link
Member

commented Jul 3, 2019

[INFO] --- maven-pmd-plugin:3.11.0:check (default) @ checkstyle ---
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.Checker:70 Rule:ProperLogger Priority:3 Logger should be defined private static final and have the correct class.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.DefaultLogger:125 Rule:CloseResource Priority:3 Ensure that resources like this OutputStream object are closed after use.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.DefaultLogger:132 Rule:CloseResource Priority:3 Ensure that resources like this OutputStreamWriter object are closed after use.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.DefaultLogger:187 Rule:CloseResource Priority:3 Ensure that resources like this OutputStream object are closed after use.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.DefaultLogger:194 Rule:CloseResource Priority:3 Ensure that resources like this OutputStreamWriter object are closed after use.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.JavaParser:79 Rule:CloseResource Priority:3 Ensure that resources like this StringReader object are closed after use.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.Main:472 Rule:CloseResource Priority:3 Ensure that resources like this OutputStream object are closed after use.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.PropertyCacheFile:148 Rule:CloseResource Priority:3 Ensure that resources like this OutputStream object are closed after use.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.PropertyCacheFile:248 Rule:CloseResource Priority:3 Ensure that resources like this OutputStream object are closed after use.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.XmlLoader:96 Rule:CloseResource Priority:3 Ensure that resources like this InputStream object are closed after use.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask:468 Rule:CloseResource Priority:3 Ensure that resources like this LogOutputStream object are closed after use.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask:469 Rule:CloseResource Priority:3 Ensure that resources like this LogOutputStream object are closed after use.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask$Formatter:684 Rule:CloseResource Priority:3 Ensure that resources like this OutputStream object are closed after use.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.checks.TranslationCheck:165 Rule:ProperLogger Priority:3 Logger should be defined private static final and have the correct class.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.XpathFileGeneratorAuditListenerTest:298 Rule:CloseResource Priority:3 Ensure that resources like this TestByteArrayOutputStream object are closed after use.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.checks.NewlineAtEndOfFileCheckTest:202 Rule:CloseResource Priority:3 Ensure that resources like this  object are closed after use.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.internal.powermock.DefaultLoggerPowerTest:44 Rule:CloseResource Priority:3 Ensure that resources like this OutputStream object are closed after use.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.internal.powermock.ImportControlLoaderPowerTest:49 Rule:CloseResource Priority:3 Ensure that resources like this InputStream object are closed after use.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.internal.powermock.ImportControlLoaderPowerTest:74 Rule:CloseResource Priority:3 Ensure that resources like this InputStream object are closed after use.
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.utils.CommonUtilTest:263 Rule:CloseResource Priority:3 Ensure that resources like this TestCloseable object are closed after use.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 52.865 s (Wall Clock)
[INFO] Finished at: 2019-07-03T13:23:52-04:00
[INFO] Final Memory: 92M/247M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.11.0:check (default) on project checkstyle: You have 20 PMD violations. For more details see: M:\checkstyleWorkspace\checkstyle\target\pmd.xml -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.11.0:check (default) on project checkstyle: You have 20 PMD violations. For more details see: M:\checkstyleWorkspace\checkstyle\target\pmd.xml
@romani

This comment has been minimized.

Copy link
Member

commented Jul 4, 2019

ProperLogger

https://pmd.github.io/latest/pmd_rules_java_errorprone.html#properlogger

This rule should be disabled, as demand for static is not correct for library projects. It is valid only for application projects.

@rnveach rnveach changed the title Upgrade PMD to 6.16.0 Upgrade PMD to 6.17.0 Aug 2, 2019

@rnveach

This comment has been minimized.

Copy link
Member Author

commented Aug 2, 2019

Updated issue title for new version of PMD. No new violations.

@romani romani added the approved label Aug 9, 2019

@romani

This comment has been minimized.

Copy link
Member

commented Aug 23, 2019

to engineers who trust caches...

I run into following today:

[INFO] --- maven-pmd-plugin:3.12.0:check (default) @ checkstyle ---
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.Checker:70
 Rule:CloneThrowsCloneNotSupportedException Priority:3 
Logger should be defined private static final and have the correct class.

https://pmd.github.io/latest/pmd_rules_java_errorprone.html#clonethrowsclonenotsupportedexception

before execution was:

[INFO] --- maven-pmd-plugin:3.12.0:check (default) @ checkstyle ---
[INFO] PMD Failure: com.puppycrawl.tools.checkstyle.Checker:70
Rule:ProperLogger Priority:3 Logger should be defined private static final
and have the correct class.

fixed by "mvn clean ..."

romani added a commit to romani/checkstyle that referenced this issue Aug 23, 2019
romani added a commit to romani/checkstyle that referenced this issue Aug 23, 2019
romani added a commit that referenced this issue Aug 23, 2019

@romani romani added this to the 8.24 milestone Aug 23, 2019

@romani

This comment has been minimized.

Copy link
Member

commented Aug 23, 2019

fix is merged.

@romani romani closed this Aug 23, 2019

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