diff --git a/.gitignore b/.gitignore index 67eff3a1..33570d8f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +HELP.md target/ !.mvn/wrapper/maven-wrapper.jar !**/src/main/**/target/ @@ -17,23 +18,19 @@ target/ *.iws *.iml *.ipr -.mvn ### NetBeans ### +/nbproject/private/ +/nbbuild/ /dist/ +/nbdist/ +/.nb-gradle/ build/ !**/src/main/**/build/ !**/src/test/**/build/ ### VS Code ### .vscode/ -/out/ -/work/ -/.gradle/ -/src/main/generated/ -/LOG_PATH_IS_UNDEFINED/ -.DS_Store - -**/props/local/globals.properties logs/ +files/ \ No newline at end of file diff --git a/.pmd b/.pmd new file mode 100644 index 00000000..34efc171 --- /dev/null +++ b/.pmd @@ -0,0 +1,1840 @@ + + + false + .ruleset + + + + + AbstractClassWithoutAbstractMethod + Best Practices + + + AccessorClassGeneration + Best Practices + + + AccessorMethodGeneration + Best Practices + + + AmbiguousResolution + Best Practices + + + ApexAssertionsShouldIncludeMessage + Best Practices + + + ApexUnitTestClassShouldHaveAsserts + Best Practices + + + ApexUnitTestClassShouldHaveRunAs + Best Practices + + + ApexUnitTestMethodShouldHaveIsTestAnnotation + Best Practices + + + ApexUnitTestShouldNotUseSeeAllDataTrue + Best Practices + + + ArrayIsStoredDirectly + Best Practices + + + AvoidGlobalModifier + Best Practices + + + AvoidInlineStyles + Best Practices + + + AvoidLogicInTrigger + Best Practices + + + AvoidMessageDigestField + Best Practices + + + AvoidPrintStackTrace + Best Practices + + + AvoidReassigningCatchVariables + Best Practices + + + AvoidReassigningLoopVariables + Best Practices + + + AvoidReassigningParameters + Best Practices + + + AvoidReassigningParameters + Best Practices + + + AvoidStringBufferField + Best Practices + + + AvoidUsingHardCodedIP + Best Practices + + + AvoidWithStatement + Best Practices + + + CheckResultSet + Best Practices + + + ClassStartNameEqualsEndName + Best Practices + + + ConnectUsingNonConnector + Best Practices + + + ConsistentReturn + Best Practices + + + ConstantsInInterface + Best Practices + + + DebugsShouldUseLoggingLevel + Best Practices + + + DefaultLabelNotLastInSwitchStmt + Best Practices + + + DontNestJsfInJstlIteration + Best Practices + + + DoubleBraceInitialization + Best Practices + + + ForLoopCanBeForeach + Best Practices + + + ForLoopVariableCount + Best Practices + + + GlobalVariable + Best Practices + + + GuardLogStatement + Best Practices + + + JUnit4SuitesShouldUseSuiteAnnotation + Best Practices + + + JUnit4TestShouldUseAfterAnnotation + Best Practices + + + JUnit4TestShouldUseBeforeAnnotation + Best Practices + + + JUnit4TestShouldUseTestAnnotation + Best Practices + + + JUnit5TestShouldBePackagePrivate + Best Practices + + + JUnitAssertionsShouldIncludeMessage + Best Practices + + + JUnitTestContainsTooManyAsserts + Best Practices + + + JUnitTestsShouldIncludeAssert + Best Practices + + + JUnitUseExpected + Best Practices + + + LiteralsFirstInComparisons + Best Practices + + + LooseCoupling + Best Practices + + + MethodReturnsInternalArray + Best Practices + + + MissingOverride + Best Practices + + + NoClassAttribute + Best Practices + + + NoHtmlComments + Best Practices + + + NoJspForward + Best Practices + + + OneDeclarationPerLine + Best Practices + + + PositionLiteralsFirstInCaseInsensitiveComparisons + Best Practices + + + PositionLiteralsFirstInComparisons + Best Practices + + + PreserveStackTrace + Best Practices + + + PrimitiveWrapperInstantiation + Best Practices + + + ReplaceEnumerationWithIterator + Best Practices + + + ReplaceHashtableWithMap + Best Practices + + + ReplaceVectorWithList + Best Practices + + + ScopeForInVariable + Best Practices + + + SimplifiableTestAssertion + Best Practices + + + SwitchStmtsShouldHaveDefault + Best Practices + + + SystemPrintln + Best Practices + + + TomKytesDespair + Best Practices + + + UnnecessaryTypeAttribute + Best Practices + + + UnusedAssignment + Best Practices + + + UnusedFormalParameter + Best Practices + + + UnusedImports + Best Practices + + + UnusedLocalVariable + Best Practices + + + UnusedLocalVariable + Best Practices + + + UnusedMacroParameter + Best Practices + + + UnusedPrivateField + Best Practices + + + UnusedPrivateMethod + Best Practices + + + UseAltAttributeForImages + Best Practices + + + UseAssertEqualsInsteadOfAssertTrue + Best Practices + + + UseAssertNullInsteadOfAssertTrue + Best Practices + + + UseAssertSameInsteadOfAssertTrue + Best Practices + + + UseAssertTrueInsteadOfAssertEquals + Best Practices + + + UseBaseWithParseInt + Best Practices + + + UseCollectionIsEmpty + Best Practices + + + UseStandardCharsets + Best Practices + + + UseTryWithResources + Best Practices + + + UseVarargs + Best Practices + + + WhileLoopWithLiteralBoolean + Best Practices + + + AbstractNaming + Code Style + + + AssignmentInOperand + Code Style + + + AtLeastOneConstructor + Code Style + + + AvoidDollarSigns + Code Style + + + AvoidFinalLocalVariable + Code Style + + + AvoidPrefixingMethodParameters + Code Style + + + AvoidProtectedFieldInFinalClass + Code Style + + + AvoidProtectedMethodInFinalClassNotExtending + Code Style + + + AvoidTabCharacter + Code Style + + + AvoidUsingNativeCode + Code Style + + + BooleanGetMethodName + Code Style + + + CallSuperInConstructor + Code Style + + + ClassNamingConventions + Code Style + + + ClassNamingConventions + Code Style + + + CodeFormat + Code Style + + + CommentDefaultAccessModifier + Code Style + + + ConfusingTernary + Code Style + + + ControlStatementBraces + Code Style + + + DefaultPackage + Code Style + + + DontImportJavaLang + Code Style + + + DuplicateImports + Code Style + + + DuplicateJspImports + Code Style + + + EmptyControlStatement + Code Style + + + EmptyMethodInAbstractClassShouldBeAbstract + Code Style + + + ExtendsObject + Code Style + + + FieldDeclarationsShouldBeAtStart + Code Style + + + FieldDeclarationsShouldBeAtStartOfClass + Code Style + + + FieldNamingConventions + Code Style + + + FieldNamingConventions + Code Style + + + FinalParameterInAbstractMethod + Code Style + + + ForLoopNaming + Code Style + + + ForLoopShouldBeWhileLoop + Code Style + + + ForLoopsMustUseBraces + Code Style + + + ForLoopsMustUseBraces + Code Style + + + ForLoopsMustUseBraces + Code Style + + + FormalParameterNamingConventions + Code Style + + + FormalParameterNamingConventions + Code Style + + + GenericsNaming + Code Style + + + IdenticalCatchBranches + Code Style + + + IfElseStmtsMustUseBraces + Code Style + + + IfElseStmtsMustUseBraces + Code Style + + + IfElseStmtsMustUseBraces + Code Style + + + IfStmtsMustUseBraces + Code Style + + + IfStmtsMustUseBraces + Code Style + + + IfStmtsMustUseBraces + Code Style + + + LineLength + Code Style + + + LinguisticNaming + Code Style + + + LocalHomeNamingConvention + Code Style + + + LocalInterfaceSessionNamingConvention + Code Style + + + LocalVariableCouldBeFinal + Code Style + + + LocalVariableNamingConventions + Code Style + + + LocalVariableNamingConventions + Code Style + + + LongVariable + Code Style + + + MDBAndSessionBeanNamingConvention + Code Style + + + MethodArgumentCouldBeFinal + Code Style + + + MethodNamingConventions + Code Style + + + MethodNamingConventions + Code Style + + + MIsLeadingVariableName + Code Style + + + MisplacedPragma + Code Style + + + NoElseReturn + Code Style + + + NoPackage + Code Style + + + OneDeclarationPerLine + Code Style + + + OnlyOneReturn + Code Style + + + PackageCase + Code Style + + + PrematureDeclaration + Code Style + + + PropertyNamingConventions + Code Style + + + RemoteInterfaceNamingConvention + Code Style + + + RemoteSessionInterfaceNamingConvention + Code Style + + + ShortClassName + Code Style + + + ShortMethodName + Code Style + + + ShortVariable + Code Style + + + SuspiciousConstantFieldName + Code Style + + + TooManyStaticImports + Code Style + + + UnnecessaryAnnotationValueElement + Code Style + + + UnnecessaryBlock + Code Style + + + UnnecessaryCast + Code Style + + + UnnecessaryConstructor + Code Style + + + UnnecessaryFullyQualifiedName + Code Style + + + UnnecessaryImport + Code Style + + + UnnecessaryLocalBeforeReturn + Code Style + + + UnnecessaryModifier + Code Style + + + UnnecessaryParentheses + Code Style + + + UnnecessaryReturn + Code Style + + + UnnecessarySemicolon + Code Style + + + UnreachableCode + Code Style + + + UseConcatOnce + Code Style + + + UseDiamondOperator + Code Style + + + UselessParentheses + Code Style + + + UselessQualifiedThis + Code Style + + + UseShortArrayInitializer + Code Style + + + UseUnderscoresInNumericLiterals + Code Style + + + VariableNamingConventions + Code Style + + + VariableNamingConventions + Code Style + + + WhileLoopsMustUseBraces + Code Style + + + WhileLoopsMustUseBraces + Code Style + + + WhileLoopsMustUseBraces + Code Style + + + AbstractClassWithoutAnyMethod + Design + + + AvoidCatchingGenericException + Design + + + AvoidDeeplyNestedIfStmts + Design + + + AvoidDeeplyNestedIfStmts + Design + + + AvoidDeeplyNestedIfStmts + Design + + + AvoidRethrowingException + Design + + + AvoidThrowingNewInstanceOfSameException + Design + + + AvoidThrowingNullPointerException + Design + + + AvoidThrowingRawExceptionTypes + Design + + + AvoidUncheckedExceptionsInSignatures + Design + + + ClassWithOnlyPrivateConstructorsShouldBeFinal + Design + + + CognitiveComplexity + Design + + + CognitiveComplexity + Design + + + CollapsibleIfStatements + Design + + + CollapsibleIfStatements + Design + + + CouplingBetweenObjects + Design + + + CyclomaticComplexity + Design + + + CyclomaticComplexity + Design + + + CyclomaticComplexity + Design + + + DataClass + Design + + + DoNotExtendJavaLangError + Design + + + ExceptionAsFlowControl + Design + + + ExcessiveClassLength + Design + + + ExcessiveClassLength + Design + + + ExcessiveImports + Design + + + ExcessiveMethodLength + Design + + + ExcessiveMethodLength + Design + + + ExcessiveObjectLength + Design + + + ExcessivePackageBodyLength + Design + + + ExcessivePackageSpecificationLength + Design + + + ExcessiveParameterList + Design + + + ExcessiveParameterList + Design + + + ExcessiveParameterList + Design + + + ExcessivePublicCount + Design + + + ExcessivePublicCount + Design + + + ExcessiveTemplateLength + Design + + + ExcessiveTypeLength + Design + + + FinalFieldCouldBeStatic + Design + + + GodClass + Design + + + ImmutableField + Design + + + LawOfDemeter + Design + + + LogicInversion + Design + + + LoosePackageCoupling + Design + + + ModifiedCyclomaticComplexity + Design + + + MutableStaticState + Design + + + NcssConstructorCount + Design + + + NcssConstructorCount + Design + + + NcssCount + Design + + + NcssMethodCount + Design + + + NcssMethodCount + Design + + + NcssMethodCount + Design + + + NcssObjectCount + Design + + + NcssTypeCount + Design + + + NcssTypeCount + Design + + + NoInlineJavaScript + Design + + + NoInlineScript + Design + + + NoInlineStyleInformation + Design + + + NoInlineStyles + Design + + + NoLongScripts + Design + + + NoScriptlets + Design + + + NPathComplexity + Design + + + NPathComplexity + Design + + + SignatureDeclareThrowsException + Design + + + SimplifiedTernary + Design + + + SimplifyBooleanAssertion + Design + + + SimplifyBooleanExpressions + Design + + + SimplifyBooleanReturns + Design + + + SimplifyConditional + Design + + + SingularField + Design + + + StdCyclomaticComplexity + Design + + + StdCyclomaticComplexity + Design + + + SwitchDensity + Design + + + TooManyFields + Design + + + TooManyFields + Design + + + TooManyFields + Design + + + TooManyMethods + Design + + + TooManyMethods + Design + + + UselessOverridingMethod + Design + + + UseObjectForClearerAPI + Design + + + UseUtilityClass + Design + + + ApexDoc + Documentation + + + CommentContent + Documentation + + + CommentRequired + Documentation + + + CommentSize + Documentation + + + UncommentedEmptyConstructor + Documentation + + + UncommentedEmptyMethodBody + Documentation + + + ApexCSRF + Error Prone + + + AssignmentInOperand + Error Prone + + + AssignmentToNonFinalStatic + Error Prone + + + AvoidAccessibilityAlteration + Error Prone + + + AvoidAssertAsIdentifier + Error Prone + + + AvoidBranchingStatementAsLastInLoop + Error Prone + + + AvoidCallingFinalize + Error Prone + + + AvoidCatchingNPE + Error Prone + + + AvoidCatchingThrowable + Error Prone + + + AvoidDecimalLiteralsInBigDecimalConstructor + Error Prone + + + AvoidDirectAccessTriggerMap + Error Prone + + + AvoidDuplicateLiterals + Error Prone + + + AvoidEnumAsIdentifier + Error Prone + + + AvoidFieldNameMatchingMethodName + Error Prone + + + AvoidFieldNameMatchingTypeName + Error Prone + + + AvoidHardcodingId + Error Prone + + + AvoidInstanceofChecksInCatchClause + Error Prone + + + AvoidLiteralsInIfCondition + Error Prone + + + AvoidLosingExceptionInformation + Error Prone + + + AvoidMultipleUnaryOperators + Error Prone + + + AvoidNonExistentAnnotations + Error Prone + + + AvoidTrailingComma + Error Prone + + + AvoidUsingOctalValues + Error Prone + + + BeanMembersShouldSerialize + Error Prone + + + BrokenNullCheck + Error Prone + + + CallSuperFirst + Error Prone + + + CallSuperLast + Error Prone + + + CheckSkipResult + Error Prone + + + ClassCastExceptionWithToArray + Error Prone + + + CloneMethodMustBePublic + Error Prone + + + CloneMethodMustImplementCloneable + Error Prone + + + CloneMethodReturnTypeMustMatchClassName + Error Prone + + + CloneThrowsCloneNotSupportedException + Error Prone + + + CloseResource + Error Prone + + + CompareObjectsWithEquals + Error Prone + + + ComparisonWithNaN + Error Prone + + + ConstructorCallsOverridableMethod + Error Prone + + + DataflowAnomalyAnalysis + Error Prone + + + DetachedTestCase + Error Prone + + + DoNotCallGarbageCollectionExplicitly + Error Prone + + + DoNotExtendJavaLangThrowable + Error Prone + + + DoNotHardCodeSDCard + Error Prone + + + DoNotTerminateVM + Error Prone + + + DoNotThrowExceptionInFinally + Error Prone + + + DontImportSun + Error Prone + + + DontUseFloatTypeForLoopIndices + Error Prone + + + EmptyCatchBlock + Error Prone + + + EmptyCatchBlock + Error Prone + + + EmptyFinalizer + Error Prone + + + EmptyFinallyBlock + Error Prone + + + EmptyForeachStmt + Error Prone + + + EmptyIfStmt + Error Prone + + + EmptyIfStmt + Error Prone + + + EmptyIfStmt + Error Prone + + + EmptyInitializer + Error Prone + + + EmptyStatementBlock + Error Prone + + + EmptyStatementBlock + Error Prone + + + EmptyStatementNotInLoop + Error Prone + + + EmptySwitchStatements + Error Prone + + + EmptySynchronizedBlock + Error Prone + + + EmptyTryBlock + Error Prone + + + EmptyTryOrFinallyBlock + Error Prone + + + EmptyWhileStmt + Error Prone + + + EmptyWhileStmt + Error Prone + + + EqualComparison + Error Prone + + + EqualsNull + Error Prone + + + FinalizeDoesNotCallSuperFinalize + Error Prone + + + FinalizeOnlyCallsSuperFinalize + Error Prone + + + FinalizeOverloaded + Error Prone + + + FinalizeShouldBeProtected + Error Prone + + + IdempotentOperations + Error Prone + + + ImplicitSwitchFallThrough + Error Prone + + + ImportFromSamePackage + Error Prone + + + InaccessibleAuraEnabledGetter + Error Prone + + + InnaccurateNumericLiteral + Error Prone + + + InstantiationToGetClass + Error Prone + + + InvalidDependencyTypes + Error Prone + + + InvalidLogMessageFormat + Error Prone + + + JspEncoding + Error Prone + + + JumbledIncrementer + Error Prone + + + JUnitSpelling + Error Prone + + + JUnitStaticSuite + Error Prone + + + LoggerIsNotStaticFinal + Error Prone + + + MethodWithSameNameAsEnclosingClass + Error Prone + + + MethodWithSameNameAsEnclosingClass + Error Prone + + + MisplacedNullCheck + Error Prone + + + MissingSerialVersionUID + Error Prone + + + MissingStaticMethodInNonInstantiatableClass + Error Prone + + + MistypedCDATASection + Error Prone + + + MoreThanOneLogger + Error Prone + + + NonCaseLabelInSwitchStatement + Error Prone + + + NonStaticInitializer + Error Prone + + + NullAssignment + Error Prone + + + OverrideBothEqualsAndHashcode + Error Prone + + + OverrideBothEqualsAndHashcode + Error Prone + + + ProjectVersionAsDependencyVersion + Error Prone + + + ProperCloneImplementation + Error Prone + + + ProperLogger + Error Prone + + + ReturnEmptyArrayRatherThanNull + Error Prone + + + ReturnEmptyCollectionRatherThanNull + Error Prone + + + ReturnFromFinallyBlock + Error Prone + + + SimpleDateFormatNeedsLocale + Error Prone + + + SingleMethodSingleton + Error Prone + + + SingletonClassReturningNewInstance + Error Prone + + + StaticEJBFieldShouldBeFinal + Error Prone + + + StringBufferInstantiationWithChar + Error Prone + + + SuspiciousEqualsMethodName + Error Prone + + + SuspiciousHashcodeMethodName + Error Prone + + + SuspiciousOctalEscape + Error Prone + + + TestClassWithoutTestCases + Error Prone + + + TestMethodsMustBeInTestClasses + Error Prone + + + TO_DATEWithoutDateFormat + Error Prone + + + TO_DATE_TO_CHAR + Error Prone + + + TO_TIMESTAMPWithoutDateFormat + Error Prone + + + UnconditionalIfStatement + Error Prone + + + UnnecessaryBooleanAssertion + Error Prone + + + UnnecessaryCaseChange + Error Prone + + + UnnecessaryConversionTemporary + Error Prone + + + UnusedNullCheckInEquals + Error Prone + + + UseCorrectExceptionLogging + Error Prone + + + UseEqualsToCompareStrings + Error Prone + + + UselessOperationOnImmutable + Error Prone + + + UseLocaleWithCaseConversions + Error Prone + + + UseProperClassLoader + Error Prone + + + AvoidSynchronizedAtMethodLevel + Multithreading + + + AvoidThreadGroup + Multithreading + + + AvoidUsingVolatile + Multithreading + + + DoNotUseThreads + Multithreading + + + DontCallThreadRun + Multithreading + + + DoubleCheckedLocking + Multithreading + + + NonThreadSafeSingleton + Multithreading + + + UnsynchronizedStaticDateFormatter + Multithreading + + + UnsynchronizedStaticFormatter + Multithreading + + + UseConcurrentHashMap + Multithreading + + + UseNotifyAllInsteadOfNotify + Multithreading + + + AddEmptyString + Performance + + + AppendCharacterWithChar + Performance + + + AvoidArrayLoops + Performance + + + AvoidAxisNavigation + Performance + + + AvoidCalendarDateCreation + Performance + + + AvoidDebugStatements + Performance + + + AvoidDmlStatementsInLoops + Performance + + + AvoidFileStream + Performance + + + AvoidInstantiatingObjectsInLoops + Performance + + + AvoidSoqlInLoops + Performance + + + AvoidSoslInLoops + Performance + + + AvoidUsingShortType + Performance + + + BigIntegerInstantiation + Performance + + + BooleanInstantiation + Performance + + + ByteInstantiation + Performance + + + ConsecutiveAppendsShouldReuse + Performance + + + ConsecutiveLiteralAppends + Performance + + + EagerlyLoadedDescribeSObjectResult + Performance + + + InefficientEmptyStringCheck + Performance + + + InefficientStringBuffering + Performance + + + InsufficientStringBufferDeclaration + Performance + + + IntegerInstantiation + Performance + + + LongInstantiation + Performance + + + OperationWithLimitsInLoop + Performance + + + OptimizableToArrayCall + Performance + + + RedundantFieldInitializer + Performance + + + ShortInstantiation + Performance + + + SimplifyStartsWith + Performance + + + StringInstantiation + Performance + + + StringToString + Performance + + + TooFewBranchesForASwitchStatement + Performance + + + UnnecessaryWrapperObjectCreation + Performance + + + UseArrayListInsteadOfVector + Performance + + + UseArraysAsList + Performance + + + UseIndexOfChar + Performance + + + UseIOStreamsWithApacheCommonsFileItem + Performance + + + UselessStringValueOf + Performance + + + UseStringBufferForStringAppends + Performance + + + UseStringBufferLength + Performance + + + ApexBadCrypto + Security + + + ApexCRUDViolation + Security + + + ApexDangerousMethods + Security + + + ApexInsecureEndpoint + Security + + + ApexOpenRedirect + Security + + + ApexSharingViolations + Security + + + ApexSOQLInjection + Security + + + ApexSuggestUsingNamedCred + Security + + + ApexXSSFromEscapeFalse + Security + + + ApexXSSFromURLParam + Security + + + HardCodedCryptoKey + Security + + + IframeMissingSrcAttribute + Security + + + InsecureCryptoIv + Security + + + NoUnsanitizedJSPExpression + Security + + + VfCsrf + Security + + + VfHtmlStyleTagXss + Security + + + VfUnescapeEl + Security + + + false + true + true +