You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by lg...@apache.org on 2018/04/18 15:48:35 UTC
mina-sshd git commit: Activated a few more PMD rules
Repository: mina-sshd
Updated Branches:
refs/heads/master a7f125519 -> 5fc90bd04
Activated a few more PMD rules
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/5fc90bd0
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/5fc90bd0
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/5fc90bd0
Branch: refs/heads/master
Commit: 5fc90bd047e814e8f004f8c4d364035062c2a97f
Parents: a7f1255
Author: Lyor Goldstein <ly...@gmail.com>
Authored: Wed Apr 18 18:51:57 2018 +0300
Committer: Lyor Goldstein <ly...@gmail.com>
Committed: Wed Apr 18 18:51:57 2018 +0300
----------------------------------------------------------------------
.../apache/sshd/common/util/buffer/Buffer.java | 1 +
sshd-pmd-ruleset.xml | 38 ++++++++++----------
2 files changed, 21 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/5fc90bd0/sshd-core/src/main/java/org/apache/sshd/common/util/buffer/Buffer.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/util/buffer/Buffer.java b/sshd-core/src/main/java/org/apache/sshd/common/util/buffer/Buffer.java
index ed4b842..3180b09 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/util/buffer/Buffer.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/util/buffer/Buffer.java
@@ -238,6 +238,7 @@ public abstract class Buffer implements Readable {
return l;
}
+ @SuppressWarnings("PMD.BooleanGetMethodName")
public boolean getBoolean() {
return getByte() != 0;
}
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/5fc90bd0/sshd-pmd-ruleset.xml
----------------------------------------------------------------------
diff --git a/sshd-pmd-ruleset.xml b/sshd-pmd-ruleset.xml
index 5b64ded..69f45be 100644
--- a/sshd-pmd-ruleset.xml
+++ b/sshd-pmd-ruleset.xml
@@ -9,25 +9,27 @@
</description>
<!-- See https://pmd.github.io/pmd-6.2.0/pmd_rules_java.html -->
- <rule ref="rulesets/java/basic.xml/AvoidMultipleUnaryOperators" />
- <rule ref="rulesets/java/basic.xml/AvoidUsingOctalValues" />
- <rule ref="rulesets/java/basic.xml/BooleanInstantiation" />
- <rule ref="rulesets/java/basic.xml/BrokenNullCheck" />
- <rule ref="rulesets/java/basic.xml/ExtendsObject" />
- <rule ref="rulesets/java/basic.xml/MisplacedNullCheck" />
- <rule ref="rulesets/java/basic.xml/OverrideBothEqualsAndHashcode" />
- <rule ref="rulesets/java/basic.xml/ReturnFromFinallyBlock" />
- <rule ref="rulesets/java/basic.xml/UnconditionalIfStatement" />
+ <rule ref="category/java/errorprone.xml/AvoidMultipleUnaryOperators" />
+ <rule ref="category/java/errorprone.xml/AvoidUsingOctalValues" />
+ <rule ref="category/java/errorprone.xml/MissingSerialVersionUID" />
+ <rule ref="category/java/errorprone.xml/BrokenNullCheck" />
+ <rule ref="category/java/errorprone.xml/MisplacedNullCheck" />
+ <rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashcode" />
+ <rule ref="category/java/errorprone.xml/ReturnFromFinallyBlock" />
+ <rule ref="category/java/errorprone.xml/UnconditionalIfStatement" />
+ <rule ref="category/java/errorprone.xml/ProperCloneImplementation" />
+ <rule ref="category/java/errorprone.xml/CloneMethodMustImplementCloneable" />
+ <rule ref="category/java/errorprone.xml/AssignmentInOperand" />
- <rule ref="rulesets/java/clone.xml/ProperCloneImplementation" />
- <rule ref="rulesets/java/clone.xml/CloneMethodMustImplementCloneable" />
+ <rule ref="category/java/codestyle.xml/AtLeastOneConstructor" />
+ <rule ref="category/java/codestyle.xml/ExtendsObject" />
+ <rule ref="category/java/codestyle.xml/BooleanGetMethodName" />
- <rule ref="rulesets/java/controversial.xml/AssignmentInOperand" />
- <rule ref="rulesets/java/controversial.xml/AtLeastOneConstructor" />
+ <rule ref="category/java/multithreading.xml/UseNotifyAllInsteadOfNotify" />
+ <rule ref="category/java/documentation.xml/UncommentedEmptyMethodBody" />
+ <rule ref="category/java/performance.xml/BooleanInstantiation" />
- <rule ref="rulesets/java/design.xml/UseNotifyAllInsteadOfNotify" />
-
- <rule ref="rulesets/java/javabeans.xml/MissingSerialVersionUID" />
-
- <rule ref="rulesets/java/logging-java.xml/AvoidPrintStackTrace" />
+ <!-- rule ref="category/java/bestpractices.xml/MethodReturnsInternalArray" / -->
+ <rule ref="category/java/bestpractices.xml/AvoidPrintStackTrace" />
+ <rule ref="category/java/bestpractices.xml/MissingOverride" />
</ruleset>
\ No newline at end of file