[jbosstools-issues] [JBoss JIRA] (JBIDE-14460) Investigate use of PMD plugin 4 (for PMD binary 5.0.4) in JBoss Central

Nick Boldt (JIRA) jira-events at lists.jboss.org
Wed Jul 3 14:10:21 EDT 2013


    [ https://issues.jboss.org/browse/JBIDE-14460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12787430#comment-12787430 ] 

Nick Boldt commented on JBIDE-14460:
------------------------------------

For JBDS only, we could default-enable all 313 rules via plugin_customization.ini:

https://github.com/jbdevstudio/jbdevstudio-product/blob/master/plugins/com.jboss.jbds.product/plugin_customization.ini

{code}net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.active_rules=,UseCorrectExceptionLogging,ShortMethodName,ScopeForInVariable,CyclomaticComplexity,AbstractClassWithoutAbstractMethod,NonStaticInitializer,AppendCharacterWithChar,SingularField,UseObjectForClearerAPI,AvoidConstantsInterface,AvoidAssertAsIdentifier,AbstractNaming,ProperCloneImplementation,AvoidUsingShortType,AvoidFinalLocalVariable,DefaultPackage,MethodArgumentCouldBeFinal,DontImportJavaLang,UseConcatOnce,NcssConstructorCount,AvoidSynchronizedAtMethodLevel,RedundantFieldInitializer,EmptyCatchBlock,MissingSerialVersionUID,BeanMembersShouldSerialize,UnusedFormalParameter,UnusedPrivateField,DefaultLabelNotLastInSwitchStmt,StringToString,BigIntegerInstantiation,AvoidPrefixingMethodParameters,StringBufferInstantiationWithChar,TooFewBranchesForASwitchStatement,SystemPrintln,EmptyMethodInAbstractClassShouldBeAbstract,IntegerInstantiation,DuplicateImports,ExcessiveMethodLength,CloneThrowsCloneNotSupportedException,JUnit4TestShouldUseTestAnnotation,ProperLogger,ReplaceEnumerationWithIterator,AddEmptyString,NonCaseLabelInSwitchStatement,EmptyFinalizer,SimplifyBooleanExpressions,DoNotExtendJavaLangError,GuardDebugLogging,CheckResultSet,UseAssertSameInsteadOfAssertTrue,DuplicateJspImports,LawOfDemeter,ByteInstantiation,AbstractClassWithoutAnyMethod,StringInstantiation,UseNotifyAllInsteadOfNotify,UselessStringValueOf,NcssTypeCount,MissingStaticMethodInNonInstantiatableClass,AvoidUsingOctalValues,TooManyStaticImports,ReturnEmptyArrayRatherThanNull,EqualsNull,ClassCastExceptionWithToArray,UnnecessaryConversionTemporary,OneDeclarationPerLine,AvoidDuplicateLiterals,UseArraysAsList,JUnit4SuitesShouldUseSuiteAnnotation,MethodWithSameNameAsEnclosingClass,CommentRequired,SimplifyBooleanReturns,FinalFieldCouldBeStatic,AvoidMultipleUnaryOperators,GenericsNaming,DoNotUseThreads,ShortVariable,AvoidDollarSigns,AvoidInstantiatingObjectsInLoops,JUnitTestContainsTooManyAsserts,IframeMissingSrcAttribute,NPathComplexity,ClassWithOnlyPrivateConstructorsShouldBeFinal,UnnecessaryReturn,InnaccurateNumericLiteral,CallSuperLast,BooleanInstantiation,MethodReturnsInternalArray,CompareObjectsWithEquals,NoPackage,AssignmentToNonFinalStatic,FinalizeOnlyCallsSuperFinalize,UseAssertTrueInsteadOfAssertEquals,AvoidUsingHardCodedIP,CollapsibleIfStatements,NoJspForward,JumbledIncrementer,SuspiciousConstantFieldName,NoScriptlets,PositionLiteralsFirstInComparisons,MissingBreakInSwitch,OverrideBothEqualsAndHashcode,SimpleDateFormatNeedsLocale,UseStringBufferLength,WhileLoopsMustUseBraces,DontNestJsfInJstlIteration,TestClassWithoutTestCases,JUnitAssertionsShouldIncludeMessage,EmptyInitializer,AvoidUsingVolatile,CallSuperInConstructor,PreserveStackTrace,ExcessivePublicCount,ExtendsObject,DontImportSun,FinalizeOverloaded,RemoteSessionInterfaceNamingConvention,AvoidStringBufferField,CallSuperFirst,MisleadingVariableName,CloneMethodMustImplementCloneable,UselessParentheses,AvoidProtectedFieldInFinalClass,MDBAndSessionBeanNamingConvention,ReturnFromFinallyBlock,NonThreadSafeSingleton,ExcessiveImports,UnusedLocalVariable,EmptySynchronizedBlock,VariableNamingConventions,CommentContent,UseAssertEqualsInsteadOfAssertTrue,PackageCase,JUnit4TestShouldUseBeforeAnnotation,UnnecessaryFullyQualifiedName,UnreachableCode,EmptyIfStmt,UnnecessaryCaseChange,EmptySwitchStatements,UnnecessaryFinalModifier,NoInlineScript,CheckSkipResult,DontCallThreadRun,AvoidTrailingComma,LongVariable,UseIndexOfChar,UnusedModifier,FinalizeShouldBeProtected,NoInlineStyleInformation,UseConcurrentHashMap,AvoidFieldNameMatchingMethodName,JUnitStaticSuite,LooseCoupling,SimplifyStartsWith,EqualComparison,MoreThanOneLogger,CommentSize,GodClass,LocalInterfaceSessionNamingConvention,DoubleCheckedLocking,DoNotCallGarbageCollectionExplicitly,DataflowAnomalyAnalysis,UselessOverridingMethod,MistypedCDATASection,ImmutableField,IfElseStmtsMustUseBraces,SignatureDeclareThrowsException,EmptyStatementNotInLoop,NoHtmlComments,DoNotThrowExceptionInFinally,JUnitUseExpected,UnusedPrivateMethod,AvoidThrowingRawExceptionTypes,UseLocaleWithCaseConversions,MethodNamingConventions,AvoidEnumAsIdentifier,ExcessiveClassLength,NcssMethodCount,AvoidFieldNameMatchingTypeName,UnnecessaryBlock,NoClassAttribute,AvoidBranchingStatementAsLastInLoop,UseStringBufferForStringAppends,AvoidLiteralsInIfCondition,UseProperClassLoader,UseSingleton,AvoidAccessibilityAlteration,ExceptionAsFlowControl,SuspiciousOctalEscape,AvoidDeeplyNestedIfStmts,NullAssignment,AvoidThreadGroup,AvoidCatchingGenericException,ArrayIsStoredDirectly,DontUseFloatTypeForLoopIndices,ClassNamingConventions,UnnecessaryConstructor,ReplaceHashtableWithMap,EmptyFinallyBlock,AvoidUsingNativeCode,JUnit4TestShouldUseAfterAnnotation,ConsistentReturn,AvoidThrowingNewInstanceOfSameException,CloseResource,FinalizeDoesNotCallSuperFinalize,SwitchDensity,BadComparison,LogicInversion,JUnitTestsShouldIncludeAssert,AvoidLosingExceptionInformation,OptimizableToArrayCall,InefficientEmptyStringCheck,FieldDeclarationsShouldBeAtStartOfClass,TooManyMethods,AssignmentInOperand,PrematureDeclaration,LoosePackageCoupling,ShortInstantiation,AvoidReassigningParameters,ConstructorCallsOverridableMethod,AvoidInstanceofChecksInCatchClause,AvoidThrowingNullPointerException,JUnitSpelling,UnconditionalIfStatement,EmptyWhileStmt,IfStmtsMustUseBraces,AvoidCatchingNPE,UseEqualsToCompareStrings,ConsecutiveLiteralAppends,AvoidDecimalLiteralsInBigDecimalConstructor,SwitchStmtsShouldHaveDefault,DoNotCallSystemExit,MisplacedNullCheck,ReplaceVectorWithList,LoggerIsNotStaticFinal,UseAssertNullInsteadOfAssertTrue,JspEncoding,EmptyTryBlock,RemoteInterfaceNamingConvention,SuspiciousEqualsMethodName,EmptyStatementBlock,IdempotentOperations,UseVarargs,AvoidPrintStackTrace,LongInstantiation,ImportFromSamePackage,ExcessiveParameterList,BooleanInversion,UnnecessaryParentheses,ForLoopsMustUseBraces,SimplifyConditional,UncommentedEmptyMethod,AtLeastOneConstructor,InsufficientStringBufferDeclaration,SimplifyBooleanAssertion,AvoidArrayLoops,CouplingBetweenObjects,UnnecessaryLocalBeforeReturn,ConfusingTernary,LocalVariableCouldBeFinal,TooManyFields,UnnecessaryWrapperObjectCreation,AvoidCallingFinalize,AccessorClassGeneration,StaticEJBFieldShouldBeFinal,AvoidCatchingThrowable,UselessOperationOnImmutable,InstantiationToGetClass,ShortClassName,UnusedNullCheckInEquals,ForLoopShouldBeWhileLoop,UnsynchronizedStaticDateFormatter,UseCollectionIsEmpty,InefficientStringBuffering,EmptyStaticInitializer,LocalHomeNamingConvention,SuspiciousHashcodeMethodName,AvoidAxisNavigation,GlobalVariable,DoNotHardCodeSDCard,NoLongScripts,BooleanGetMethodName,BrokenNullCheck,UncommentedEmptyConstructor,UseArrayListInsteadOfVector,UnusedImports,OnlyOneReturn,UnnecessaryBooleanAssertion,AvoidRethrowingException{code}

Could do the same thing in https://github.com/jbosstools/jbosstools-central/tree/master/central/plugins/org.jboss.tools.community.central for JBT, if we wanted this turned on for anyone who's installed Central.
                
> Investigate use of PMD plugin 4 (for PMD binary 5.0.4) in JBoss Central
> -----------------------------------------------------------------------
>
>                 Key: JBIDE-14460
>                 URL: https://issues.jboss.org/browse/JBIDE-14460
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: Central
>    Affects Versions: 4.1.0.Alpha1
>            Reporter: Nick Boldt
>            Assignee: Radim Hopp
>            Priority: Blocker
>              Labels: respin-a
>             Fix For: 4.1.0.CR1
>
>
> Need to evaluate if PMD 4.0 is compatible w/ Kepler and works the same way as the previous 3.2.6 version which we included with JBT 4.0 / JBDS 6.
> Mirror is here: http://download.jboss.org/jbosstools/updates/requirements/pmd/4.0.0.v20130510-1000/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the jbosstools-issues mailing list