Updated PMD rules.

This commit is contained in:
Erik C. Thauvin 2021-05-29 22:01:18 -07:00
parent e873d01338
commit 3f628e58f0
4 changed files with 90 additions and 243 deletions

View file

@ -21,7 +21,7 @@ final def semverProcessor = "net.thauvin.erik:semver:1.2.0"
ext.versions = [ ext.versions = [
log4j : '2.14.1', log4j : '2.14.1',
pmd : '6.34.0', pmd : '6.35.0',
] ]
repositories { repositories {
@ -65,8 +65,8 @@ dependencies {
test { test {
testLogging { testLogging {
exceptionFormat "full" exceptionFormat = "full"
events /* "passed", */ "skipped", "failed" events(/* "passed", */ "skipped", "failed")
} }
useTestNG() { useTestNG() {
options.suites('src/test/resources/testng.xml') options.suites('src/test/resources/testng.xml')
@ -129,7 +129,7 @@ clean {
} }
run { run {
args '-d' args('-d')
} }
incrementBuildMeta { incrementBuildMeta {
@ -144,9 +144,9 @@ incrementBuildMeta {
sonarqube { sonarqube {
properties { properties {
property "sonar.organization", "ethauvin-github" property("sonar.organization", "ethauvin-github")
property "sonar.projectKey", "ethauvin_mobibot" property("sonar.projectKey", "ethauvin_mobibot")
property "sonar.host.url", "https://sonarcloud.io" property("sonar.host.url", "https://sonarcloud.io")
} }
} }
@ -155,7 +155,7 @@ jacoco {
} }
jacocoTestReport { jacocoTestReport {
dependsOn test dependsOn(test)
reports { reports {
html.enabled = true html.enabled = true
xml.enabled = true xml.enabled = true
@ -175,27 +175,26 @@ tasks.sonarqube {
task copyToDeploy(type: Copy) { task copyToDeploy(type: Copy) {
from('properties') from('properties')
from jar from(jar)
into deployDir into(deployDir)
} }
task copyToDeployLib(type: Copy) { task copyToDeployLib(type: Copy) {
from(configurations.runtimeClasspath) { from(configurations.runtimeClasspath) {
exclude 'annotations-*.jar' exclude('annotations-*.jar')
} }
into deployDir + '/lib' into(deployDir + '/lib')
} }
task deploy(dependsOn: ['clean', 'build', 'jar']) { task deploy(dependsOn: ['clean', 'build', 'jar']) {
description = "Copies all needed files to the ${deployDir} directory." description = "Copies all needed files to the ${deployDir} directory."
group = 'Publishing' group = 'Publishing'
outputs.dir deployDir outputs.dir(deployDir)
inputs.files copyToDeploy inputs.files(copyToDeploy, copyToDeployLib)
inputs.files copyToDeployLib
doLast { doLast {
file(deployDir + '/logs').mkdir() file(deployDir + '/logs').mkdir()
} }
mustRunAfter clean mustRunAfter(clean)
} }
task release(dependsOn: ['wrapper', 'deploy']) { task release(dependsOn: ['wrapper', 'deploy']) {

View file

@ -1,116 +1,82 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<ruleset name="erik" <ruleset name="erik"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd"> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
<description>Erik's Ruleset</description> <description>Erik's Ruleset</description>
<!-- BEST PRACTICES --> <!-- BEST PRACTICES -->
<rule ref="category/java/bestpractices.xml/AvoidMessageDigestField"/> <rule ref="category/java/bestpractices.xml">
<!-- <rule ref="category/java/bestpractices.xml/AvoidStringBufferField"/> --> <exclude name="AvoidPrintStackTrace"/>
<rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP"/> <exclude name="JUnit4TestShouldUseTestAnnotation"/>
<rule ref="category/java/bestpractices.xml/CheckResultSet"/> <exclude name="JUnitTestContainsTooManyAsserts"/>
<rule ref="category/java/bestpractices.xml/ConstantsInInterface"/> </rule>
<rule ref="category/java/bestpractices.xml/DefaultLabelNotLastInSwitchStmt"/>
<rule ref="category/java/bestpractices.xml/DoubleBraceInitialization"/>
<rule ref="category/java/bestpractices.xml/ForLoopCanBeForeach"/>
<rule ref="category/java/bestpractices.xml/GuardLogStatement"/>
<rule ref="category/java/bestpractices.xml/LiteralsFirstInComparisons" />
<!-- <rule ref="category/java/bestpractices.xml/LooseCoupling"/> -->
<rule ref="category/java/bestpractices.xml/MethodReturnsInternalArray"/>
<rule ref="category/java/bestpractices.xml/MissingOverride"> <rule ref="category/java/bestpractices.xml/MissingOverride">
<properties> <properties>
<property name="violationSuppressXPath" value="//MethodDeclaration[@Name='hashCode' or @Name='equals' or @Name='toString']"/> <property name="violationSuppressXPath"
value="//MethodDeclaration[@Name='hashCode' or @Name='equals' or @Name='toString']"/>
</properties> </properties>
</rule> </rule>
<rule ref="category/java/bestpractices.xml/OneDeclarationPerLine"/>
<rule ref="category/java/bestpractices.xml/PreserveStackTrace"/>
<rule ref="category/java/bestpractices.xml/ReplaceEnumerationWithIterator"/>
<!-- <rule ref="category/java/bestpractices.xml/ReplaceHashtableWithMap"/>
<rule ref="category/java/bestpractices.xml/ReplaceVectorWithList"/> -->
<rule ref="category/java/bestpractices.xml/SwitchStmtsShouldHaveDefault"/>
<rule ref="category/java/bestpractices.xml/SystemPrintln"/>
<rule ref="category/java/bestpractices.xml/UnusedAssignment"/>
<rule ref="category/java/bestpractices.xml/UnusedFormalParameter"/>
<rule ref="category/java/bestpractices.xml/UnusedLocalVariable"/>
<rule ref="category/java/bestpractices.xml/UnusedPrivateField"/>
<rule ref="category/java/bestpractices.xml/UnusedPrivateMethod"/>
<rule ref="category/java/bestpractices.xml/UseAssertEqualsInsteadOfAssertTrue"/>
<rule ref="category/java/bestpractices.xml/UseAssertNullInsteadOfAssertTrue"/>
<rule ref="category/java/bestpractices.xml/UseAssertSameInsteadOfAssertTrue"/>
<rule ref="category/java/bestpractices.xml/UseAssertTrueInsteadOfAssertEquals"/>
<rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty"/>
<rule ref="category/java/bestpractices.xml/UseVarargs"/>
<!-- NAMING CONVENTIONS --> <!-- CODE STYLE -->
<!-- <rule ref="category/java/codestyle.xml/ClassNamingConventions"/> --> <rule ref="category/java/codestyle.xml">
<rule ref="category/java/codestyle.xml/FormalParameterNamingConventions"/> <exclude name="AtLeastOneConstructor"/>
<rule ref="category/java/codestyle.xml/GenericsNaming"/> <exclude name="ClassNamingConventions"/>
<rule ref="category/java/codestyle.xml/LocalVariableNamingConventions"/> <exclude name="ConfusingTernary"/>
<rule ref="category/java/codestyle.xml/MethodNamingConventions"/> <exclude name="CommentDefaultAccessModifier"/>
<!-- <rule ref="category/java/codestyle.xml/PackageCase"/> --> <exclude name="DefaultPackage"/>
<exclude name="FieldNamingConventions"/>
<exclude name="LongVariable"/>
<!-- OTHER --> <exclude name="OnlyOneReturn"/>
<rule ref="category/java/codestyle.xml/AvoidDollarSigns"/> <exclude name="PackageCase"/>
<rule ref="category/java/codestyle.xml/AvoidProtectedFieldInFinalClass"/> <exclude name="ShortClassName"/>
<rule ref="category/java/codestyle.xml/AvoidProtectedMethodInFinalClassNotExtending"/> <exclude name="ShortMethodName"/>
<rule ref="category/java/codestyle.xml/AvoidUsingNativeCode"/> <exclude name="ShortVariable"/>
<rule ref="category/java/codestyle.xml/BooleanGetMethodName"/> <exclude name="UselessParentheses"/>
<rule ref="category/java/codestyle.xml/CallSuperInConstructor"/> <exclude name="UseUnderscoresInNumericLiterals"/>
<rule ref="category/java/codestyle.xml/ControlStatementBraces"/> </rule>
<rule ref="category/java/codestyle.xml/EmptyMethodInAbstractClassShouldBeAbstract"/>
<rule ref="category/java/codestyle.xml/ExtendsObject"/>
<rule ref="category/java/codestyle.xml/FieldDeclarationsShouldBeAtStartOfClass"/>
<rule ref="category/java/codestyle.xml/ForLoopShouldBeWhileLoop"/>
<rule ref="category/java/codestyle.xml/IdenticalCatchBranches"/>
<rule ref="category/java/codestyle.xml/LocalVariableCouldBeFinal"/>
<rule ref="category/java/codestyle.xml/MethodArgumentCouldBeFinal"/>
<rule ref="category/java/codestyle.xml/NoPackage"/>
<rule ref="category/java/codestyle.xml/PrematureDeclaration"/>
<rule ref="category/java/codestyle.xml/TooManyStaticImports"/>
<rule ref="category/java/codestyle.xml/UnnecessaryAnnotationValueElement"/>
<rule ref="category/java/codestyle.xml/UnnecessaryConstructor"/>
<rule ref="category/java/codestyle.xml/UnnecessaryFullyQualifiedName"/>
<rule ref="category/java/codestyle.xml/UnnecessaryLocalBeforeReturn"/>
<!-- <rule ref="category/java/codestyle.xml/UnnecessaryModifier"/> -->
<rule ref="category/java/codestyle.xml/UnnecessaryReturn"/>
<!-- <rule ref="category/java/codestyle.xml/UselessParentheses"/> -->
<rule ref="category/java/codestyle.xml/UselessQualifiedThis"/>
<!-- DESIGN --> <!-- DESIGN -->
<rule ref="category/java/design.xml/AbstractClassWithoutAnyMethod"/> <rule ref="category/java/design.xml">
<rule ref="category/java/design.xml/AvoidRethrowingException"/> <exclude name="AvoidCatchingGenericException"/>
<rule ref="category/java/design.xml/AvoidThrowingNewInstanceOfSameException"/> <exclude name="AvoidDeeplyNestedIfStmts"/>
<rule ref="category/java/design.xml/AvoidThrowingNullPointerException"/> <exclude name="AvoidUncheckedExceptionsInSignatures"/>
<rule ref="category/java/design.xml/AvoidThrowingRawExceptionTypes"/> <exclude name="CognitiveComplexity"/>
<rule ref="category/java/design.xml/ClassWithOnlyPrivateConstructorsShouldBeFinal"/> <exclude name="CyclomaticComplexity"/>
<rule ref="category/java/design.xml/CollapsibleIfStatements"/> <exclude name="ExcessiveClassLength"/>
<rule ref="category/java/design.xml/CouplingBetweenObjects"/> <exclude name="ExcessiveMethodLength"/>
<rule ref="category/java/design.xml/DataClass"/> <exclude name="ExcessiveParameterList"/>
<rule ref="category/java/design.xml/DoNotExtendJavaLangError"/> <exclude name="ExcessivePublicCount"/>
<rule ref="category/java/design.xml/ExceptionAsFlowControl"/> <exclude name="GodClass"/>
<!-- <rule ref="category/java/design.xml/ExcessivePublicCount"/> --> <exclude name="LawOfDemeter"/>
<rule ref="category/java/design.xml/FinalFieldCouldBeStatic"/> <exclude name="LoosePackageCoupling"/>
<rule ref="category/java/design.xml/ImmutableField"/> <exclude name="NPathComplexity"/>
<rule ref="category/java/design.xml/LogicInversion"/> <exclude name="NcssCount"/>
<rule ref="category/java/design.xml/SignatureDeclareThrowsException"/> <exclude name="TooManyFields"/>
<rule ref="category/java/design.xml/SimplifiedTernary"/> <exclude name="TooManyMethods"/>
<rule ref="category/java/design.xml/SimplifyBooleanAssertion"/> <exclude name="UseObjectForClearerAPI"/>
<rule ref="category/java/design.xml/SimplifyBooleanExpressions"/> </rule>
<rule ref="category/java/design.xml/SimplifyBooleanReturns"/>
<rule ref="category/java/design.xml/SimplifyConditional"/>
<rule ref="category/java/design.xml/SingularField"/>
<rule ref="category/java/design.xml/SwitchDensity"/>
<rule ref="category/java/design.xml/UselessOverridingMethod"/>
<rule ref="category/java/design.xml/UseUtilityClass"/>
<!-- DOCUMENTATION --> <!-- DOCUMENTATION -->
<rule ref="category/java/documentation.xml/UncommentedEmptyConstructor"/> <rule ref="category/java/documentation.xml">
<rule ref="category/java/documentation.xml/UncommentedEmptyMethodBody"/> <exclude name="CommentRequired"/>
<exclude name="CommentSize"/>
</rule>
<!-- ERROR PRONE --> <!-- ERROR PRONE -->
<rule ref="category/java/errorprone.xml">
<exclude name="AssignmentInOperand"/>
<exclude name="AvoidCatchingNPE"/>
<exclude name="AvoidDuplicateLiterals"/>
<exclude name="AvoidFieldNameMatchingMethodName"/>
<exclude name="AvoidFieldNameMatchingTypeName"/>
<exclude name="AvoidLiteralsInIfCondition"/>
<exclude name="BeanMembersShouldSerialize"/>
<exclude name="EmptyCatchBlock"/>
<exclude name="NullAssignment"/>
</rule>
<rule ref="category/java/errorprone.xml/AssignmentInOperand"> <rule ref="category/java/errorprone.xml/AssignmentInOperand">
<properties> <properties>
<property name="allowWhile" value="true"/> <property name="allowWhile" value="true"/>
@ -118,85 +84,11 @@
<property name="allowIf" value="true"/> <property name="allowIf" value="true"/>
</properties> </properties>
</rule> </rule>
<rule ref="category/java/errorprone.xml/AssignmentToNonFinalStatic"/>
<rule ref="category/java/errorprone.xml/AvoidAccessibilityAlteration"/>
<rule ref="category/java/errorprone.xml/AvoidAssertAsIdentifier"/>
<rule ref="category/java/errorprone.xml/AvoidBranchingStatementAsLastInLoop"/>
<rule ref="category/java/errorprone.xml/AvoidCallingFinalize"/>
<rule ref="category/java/errorprone.xml/AvoidCatchingThrowable"/>
<rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor"/>
<rule ref="category/java/errorprone.xml/AvoidDuplicateLiterals"> <rule ref="category/java/errorprone.xml/AvoidDuplicateLiterals">
<properties> <properties>
<property name="skipAnnotations" value="true"/> <property name="skipAnnotations" value="true"/>
</properties> </properties>
</rule> </rule>
<rule ref="category/java/errorprone.xml/AvoidEnumAsIdentifier"/>
<rule ref="category/java/errorprone.xml/AvoidInstanceofChecksInCatchClause"/>
<rule ref="category/java/errorprone.xml/AvoidLosingExceptionInformation"/>
<rule ref="category/java/errorprone.xml/AvoidMultipleUnaryOperators"/>
<rule ref="category/java/errorprone.xml/AvoidUsingOctalValues"/>
<rule ref="category/java/errorprone.xml/BadComparison"/>
<rule ref="category/java/errorprone.xml/BrokenNullCheck"/>
<rule ref="category/java/errorprone.xml/CallSuperFirst"/>
<rule ref="category/java/errorprone.xml/CallSuperLast"/>
<rule ref="category/java/errorprone.xml/CheckSkipResult"/>
<rule ref="category/java/errorprone.xml/ClassCastExceptionWithToArray"/>
<rule ref="category/java/errorprone.xml/CloneMethodMustBePublic"/>
<rule ref="category/java/errorprone.xml/CloneMethodMustImplementCloneable"/>
<rule ref="category/java/errorprone.xml/CloneMethodReturnTypeMustMatchClassName"/>
<rule ref="category/java/errorprone.xml/CloneThrowsCloneNotSupportedException"/>
<rule ref="category/java/errorprone.xml/CloseResource"/>
<rule ref="category/java/errorprone.xml/CompareObjectsWithEquals"/>
<rule ref="category/java/errorprone.xml/ConstructorCallsOverridableMethod"/>
<rule ref="category/java/errorprone.xml/DoNotCallGarbageCollectionExplicitly"/>
<rule ref="category/java/errorprone.xml/DoNotExtendJavaLangThrowable"/>
<rule ref="category/java/errorprone.xml/DoNotHardCodeSDCard"/>
<rule ref="category/java/errorprone.xml/DoNotThrowExceptionInFinally"/>
<rule ref="category/java/errorprone.xml/DontImportSun"/>
<rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices"/>
<rule ref="category/java/errorprone.xml/EqualsNull"/>
<rule ref="category/java/errorprone.xml/FinalizeDoesNotCallSuperFinalize"/>
<rule ref="category/java/errorprone.xml/FinalizeOnlyCallsSuperFinalize"/>
<rule ref="category/java/errorprone.xml/FinalizeOverloaded"/>
<rule ref="category/java/errorprone.xml/FinalizeShouldBeProtected"/>
<rule ref="category/java/errorprone.xml/IdempotentOperations"/>
<rule ref="category/java/errorprone.xml/InstantiationToGetClass"/>
<rule ref="category/java/errorprone.xml/InvalidLogMessageFormat"/>
<rule ref="category/java/errorprone.xml/JumbledIncrementer"/>
<rule ref="category/java/errorprone.xml/JUnitSpelling"/>
<rule ref="category/java/errorprone.xml/JUnitStaticSuite"/>
<rule ref="category/java/errorprone.xml/MethodWithSameNameAsEnclosingClass"/>
<rule ref="category/java/errorprone.xml/MisplacedNullCheck"/>
<rule ref="category/java/errorprone.xml/MissingBreakInSwitch"/>
<rule ref="category/java/errorprone.xml/MissingSerialVersionUID"/>
<rule ref="category/java/errorprone.xml/MissingStaticMethodInNonInstantiatableClass"/>
<rule ref="category/java/errorprone.xml/MoreThanOneLogger"/>
<rule ref="category/java/errorprone.xml/NonCaseLabelInSwitchStatement"/>
<rule ref="category/java/errorprone.xml/NonStaticInitializer"/>
<!-- <rule ref="category/java/errorprone.xml/NullAssignment"/> -->
<rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashcode"/>
<rule ref="category/java/errorprone.xml/ProperCloneImplementation"/>
<rule ref="category/java/errorprone.xml/ProperLogger"/>
<rule ref="category/java/errorprone.xml/ReturnEmptyArrayRatherThanNull"/>
<rule ref="category/java/errorprone.xml/ReturnFromFinallyBlock"/>
<rule ref="category/java/errorprone.xml/SimpleDateFormatNeedsLocale"/>
<rule ref="category/java/errorprone.xml/SingleMethodSingleton"/>
<rule ref="category/java/errorprone.xml/SingletonClassReturningNewInstance"/>
<rule ref="category/java/errorprone.xml/StaticEJBFieldShouldBeFinal"/>
<rule ref="category/java/errorprone.xml/StringBufferInstantiationWithChar"/>
<rule ref="category/java/errorprone.xml/SuspiciousEqualsMethodName"/>
<rule ref="category/java/errorprone.xml/SuspiciousHashcodeMethodName"/>
<rule ref="category/java/errorprone.xml/SuspiciousOctalEscape"/>
<rule ref="category/java/errorprone.xml/TestClassWithoutTestCases"/>
<rule ref="category/java/errorprone.xml/UnconditionalIfStatement"/>
<rule ref="category/java/errorprone.xml/UnnecessaryBooleanAssertion"/>
<rule ref="category/java/errorprone.xml/UnnecessaryCaseChange"/>
<rule ref="category/java/errorprone.xml/UnnecessaryConversionTemporary"/>
<rule ref="category/java/errorprone.xml/UnusedNullCheckInEquals"/>
<rule ref="category/java/errorprone.xml/UseCorrectExceptionLogging"/>
<rule ref="category/java/errorprone.xml/UseEqualsToCompareStrings"/>
<rule ref="category/java/errorprone.xml/UselessOperationOnImmutable"/>
<rule ref="category/java/errorprone.xml/UseLocaleWithCaseConversions"/>
<rule ref="category/java/errorprone.xml/EmptyCatchBlock"> <rule ref="category/java/errorprone.xml/EmptyCatchBlock">
<properties> <properties>
<property name="allowExceptionNameRegex"> <property name="allowExceptionNameRegex">
@ -204,60 +96,16 @@
</property> </property>
</properties> </properties>
</rule> </rule>
<rule ref="category/java/errorprone.xml/EmptyFinalizer"/>
<rule ref="category/java/errorprone.xml/EmptyFinallyBlock"/>
<rule ref="category/java/errorprone.xml/EmptyIfStmt"/>
<rule ref="category/java/errorprone.xml/EmptyInitializer"/>
<rule ref="category/java/errorprone.xml/EmptyStatementBlock"/>
<rule ref="category/java/errorprone.xml/EmptyStatementNotInLoop"/>
<rule ref="category/java/errorprone.xml/EmptySwitchStatements"/>
<rule ref="category/java/errorprone.xml/EmptySynchronizedBlock"/>
<rule ref="category/java/errorprone.xml/EmptyTryBlock"/>
<rule ref="category/java/errorprone.xml/EmptyWhileStmt"/>
<!-- MULTITHREADING --> <!-- MULTITHREADING -->
<rule ref="category/java/multithreading.xml/AvoidSynchronizedAtMethodLevel"/> <rule ref="category/java/multithreading.xml">
<rule ref="category/java/multithreading.xml/AvoidThreadGroup"/> </rule>
<rule ref="category/java/multithreading.xml/AvoidUsingVolatile"/>
<rule ref="category/java/multithreading.xml/DontCallThreadRun"/>
<rule ref="category/java/multithreading.xml/DoubleCheckedLocking"/>
<rule ref="category/java/multithreading.xml/NonThreadSafeSingleton"/>
<rule ref="category/java/multithreading.xml/UnsynchronizedStaticFormatter"/>
<rule ref="category/java/multithreading.xml/UseConcurrentHashMap"/>
<rule ref="category/java/multithreading.xml/UseNotifyAllInsteadOfNotify"/>
<!-- PERFORMANCE --> <!-- PERFORMANCE -->
<rule ref="category/java/performance.xml/AddEmptyString"/> <rule ref="category/java/performance.xml">
<rule ref="category/java/performance.xml/AppendCharacterWithChar"/> </rule>
<rule ref="category/java/performance.xml/AvoidArrayLoops"/>
<rule ref="category/java/performance.xml/AvoidFileStream"/>
<rule ref="category/java/performance.xml/AvoidInstantiatingObjectsInLoops"/>
<rule ref="category/java/performance.xml/BigIntegerInstantiation"/>
<rule ref="category/java/performance.xml/BooleanInstantiation"/>
<rule ref="category/java/performance.xml/ByteInstantiation"/>
<rule ref="category/java/performance.xml/ConsecutiveAppendsShouldReuse"/>
<rule ref="category/java/performance.xml/ConsecutiveLiteralAppends"/>
<rule ref="category/java/performance.xml/InefficientEmptyStringCheck"/>
<rule ref="category/java/performance.xml/InefficientStringBuffering"/>
<rule ref="category/java/performance.xml/InsufficientStringBufferDeclaration"/>
<rule ref="category/java/performance.xml/IntegerInstantiation"/>
<rule ref="category/java/performance.xml/LongInstantiation"/>
<rule ref="category/java/performance.xml/OptimizableToArrayCall"/>
<rule ref="category/java/performance.xml/RedundantFieldInitializer"/>
<rule ref="category/java/performance.xml/ShortInstantiation"/>
<rule ref="category/java/performance.xml/StringInstantiation"/>
<rule ref="category/java/performance.xml/StringToString"/>
<rule ref="category/java/performance.xml/TooFewBranchesForASwitchStatement"/>
<rule ref="category/java/performance.xml/UnnecessaryWrapperObjectCreation"/>
<!-- <rule ref="category/java/performance.xml/UseArrayListInsteadOfVector"/> -->
<rule ref="category/java/performance.xml/UseArraysAsList"/>
<rule ref="category/java/performance.xml/UseIndexOfChar"/>
<rule ref="category/java/performance.xml/UselessStringValueOf"/>
<rule ref="category/java/performance.xml/UseStringBufferForStringAppends"/>
<rule ref="category/java/performance.xml/UseStringBufferLength"/>
<!-- SECURITY --> <!-- SECURITY -->
<rule ref="category/java/security.xml/HardCodedCryptoKey"/> <rule ref="category/java/security.xml">
<rule ref="category/java/security.xml/InsecureCryptoIv"/> </rule>
</ruleset> </ruleset>

View file

@ -52,10 +52,10 @@ public final class War extends AbstractModule {
// War command // War command
private static final String WAR_CMD = "war"; private static final String WAR_CMD = "war";
// Deck of card // Deck of card
private static final String[] WAR_DECK = private static final String[] WAR_DECK =
new String[]{"Ace", "King", "Queen", "Jack", "10", "9", "8", "7", "6", "5", "4", "3", "2"}; {"Ace", "King", "Queen", "Jack", "10", "9", "8", "7", "6", "5", "4", "3", "2"};
// Suits for the deck of card // Suits for the deck of card
private static final String[] WAR_SUITS = new String[]{"Hearts", "Spades", "Diamonds", "Clubs"}; private static final String[] WAR_SUITS = {"Hearts", "Spades", "Diamonds", "Clubs"};
/** /**
* The default constructor. * The default constructor.

View file

@ -1,9 +1,9 @@
#Generated by the Semver Plugin for Gradle #Generated by the Semver Plugin for Gradle
#Fri May 28 11:36:41 PDT 2021 #Sat May 29 22:00:14 PDT 2021
version.buildmeta=855 version.buildmeta=866
version.major=0 version.major=0
version.minor=8 version.minor=8
version.patch=0 version.patch=0
version.prerelease=beta version.prerelease=beta
version.project=mobibot version.project=mobibot
version.semver=0.8.0-beta+855 version.semver=0.8.0-beta+866