Changeset 13202 in josm for trunk/tools/pmd
- Timestamp:
- 2017-12-16T21:06:42+01:00 (7 years ago)
- Location:
- trunk/tools/pmd
- Files:
-
- 6 added
- 4 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/pmd
-
Property svn:ignore
set to
cache
-
Property svn:ignore
set to
-
trunk/tools/pmd/designer.bat
r11713 r13202 2 2 set TOPDIR=%~dp0.. 3 3 set OPTS= 4 set MAIN_CLASS=net.sourceforge.pmd.util. designer.Designer4 set MAIN_CLASS=net.sourceforge.pmd.util.fxdesigner.Designer 5 5 6 java -classpath %TOPDIR%\pmd\*%OPTS% %MAIN_CLASS% %*6 java -classpath "%TOPDIR%\pmd\*" %OPTS% %MAIN_CLASS% %* -
trunk/tools/pmd/josm-ruleset.xml
r12877 r13202 7 7 <description>JOSM PMD ruleset</description> 8 8 9 <!-- <rule ref="rulesets/java/basic.xml"/> 10 <rule ref="rulesets/java/braces.xml"/> 11 <rule ref="rulesets/java/clone.xml"/> 12 <rule ref="rulesets/java/codesize.xml"/> 13 <rule ref="rulesets/java/comments.xml"/> 14 <rule ref="rulesets/java/design.xml"/> 15 <rule ref="rulesets/java/empty.xml"/> 16 <rule ref="rulesets/java/finalizers.xml"/> 17 <rule ref="rulesets/java/imports.xml"/> 18 <rule ref="rulesets/java/migrating.xml"/>--> 19 <rule ref="rulesets/java/naming.xml"> 20 <exclude name="AbstractNaming"/> 21 <exclude name="AvoidFieldNameMatchingMethodName"/> 22 <exclude name="AvoidFieldNameMatchingTypeName"/> 23 <exclude name="BooleanGetMethodName"/> 24 <exclude name="LongVariable"/> 25 <exclude name="ShortClassName"/> 26 <exclude name="ShortMethodName"/> 27 <exclude name="ShortVariable"/> 28 <exclude name="MethodNamingConventions"/> 29 <exclude name="VariableNamingConventions"/> 9 <rule ref="category/java/bestpractices.xml"> 10 <exclude name="AccessorClassGeneration"/> 11 <exclude name="AccessorMethodGeneration"/> 12 <exclude name="ArrayIsStoredDirectly"/> 13 <exclude name="AvoidPrintStackTrace"/> 14 <exclude name="AvoidReassigningParameters"/> 15 <exclude name="AvoidStringBufferField"/> 16 <exclude name="AvoidUsingHardCodedIP"/> 17 <exclude name="ConstantsInInterface"/> 18 <exclude name="ForLoopCanBeForeach"/> 19 <exclude name="GuardLogStatement"/> 20 <exclude name="JUnit4TestShouldUseAfterAnnotation"/> 21 <exclude name="JUnit4TestShouldUseTestAnnotation"/> 22 <exclude name="LooseCoupling"/> 23 <exclude name="MethodReturnsInternalArray"/> 24 <exclude name="OneDeclarationPerLine"/> 25 <exclude name="PositionLiteralsFirstInComparisons"/> 26 <exclude name="PreserveStackTrace"/> 27 <exclude name="ReplaceHashtableWithMap"/> 28 <exclude name="SwitchStmtsShouldHaveDefault"/> 29 <exclude name="SystemPrintln"/> 30 <exclude name="UnusedFormalParameter"/> 31 <exclude name="UseVarargs"/> 30 32 </rule> 31 <rule ref="rulesets/java/naming.xml/ShortMethodName"> 33 <rule ref="category/java/bestpractices.xml/UnusedFormalParameter"> 34 <properties> 35 <property name="violationSuppressXPath" value="//Annotation[MarkerAnnotation/Name/@Image='Deprecated']/..[MethodDeclaration|ConstructorDeclaration]"/> 36 </properties> 37 </rule> 38 <rule ref="category/java/codestyle.xml"> 39 <exclude name="AbstractNaming"/> 40 <exclude name="AtLeastOneConstructor"/> 41 <exclude name="AvoidFinalLocalVariable"/> 42 <exclude name="AvoidPrefixingMethodParameters"/> 43 <exclude name="BooleanGetMethodName"/> 44 <exclude name="CallSuperInConstructor"/> 45 <exclude name="CommentDefaultAccessModifier"/> 46 <exclude name="ConfusingTernary"/> 47 <exclude name="DefaultPackage"/> 48 <exclude name="EmptyMethodInAbstractClassShouldBeAbstract"/> 49 <exclude name="FieldDeclarationsShouldBeAtStartOfClass"/> 50 <exclude name="ForLoopsMustUseBraces"/> 51 <exclude name="IfElseStmtsMustUseBraces"/> 52 <exclude name="IfStmtsMustUseBraces"/> 53 <exclude name="LocalVariableCouldBeFinal"/> 54 <exclude name="LongVariable"/> 55 <exclude name="MethodArgumentCouldBeFinal"/> 56 <exclude name="MethodNamingConventions"/> 57 <exclude name="OnlyOneReturn"/> 58 <exclude name="PrematureDeclaration"/> 59 <exclude name="ShortClassName"/> 60 <exclude name="ShortMethodName"/> 61 <exclude name="ShortVariable"/> 62 <exclude name="TooManyStaticImports"/> 63 <exclude name="UnnecessaryConstructor"/> 64 <exclude name="UselessParentheses"/> 65 <exclude name="VariableNamingConventions"/> 66 <exclude name="WhileLoopsMustUseBraces"/> 67 </rule> 68 <rule ref="category/java/codestyle.xml/ShortMethodName"> 32 69 <properties> 33 70 <property name="violationSuppressXPath" value="//MethodDeclarator[@Image='at' or @Image='ht' or @Image='of' or @Image='ok' or @Image='tr'] 34 35 71 | //MethodDeclarator/../../Annotation/MarkerAnnotation/Name[@Image='Deprecated'] 72 | //MethodDeclarator/../../../..[@Image='LambertConformalConic']"/> 36 73 </properties> 37 74 </rule> 38 <rule ref=" rulesets/java/naming.xml/MethodNamingConventions">75 <rule ref="category/java/codestyle.xml/MethodNamingConventions"> 39 76 <properties> 40 77 <property name="violationSuppressXPath" value="//MethodDeclarator/../../../..[@Image='Functions' or @Image='PseudoClasses' or @Image='Role' or @Image='TaggingPreset']"/> 41 78 </properties> 42 79 </rule> 43 <rule ref=" rulesets/java/naming.xml/VariableNamingConventions">80 <rule ref="category/java/codestyle.xml/VariableNamingConventions"> 44 81 <properties> 45 82 <property name="violationSuppressXPath" value="//FieldDeclaration[@Public='true'] 46 47 48 49 50 51 52 53 54 55 56 57 58 83 | //FieldDeclaration/../Annotation/MarkerAnnotation/Name[@Image='pref'] 84 | //FieldDeclaration/Type/ReferenceType/ClassOrInterfaceType[@Image!='Boolean' and 85 @Image!='Byte' and 86 @Image!='Character' and 87 @Image!='Class' and 88 @Image!='Double' and 89 @Image!='Enum' and 90 @Image!='Float' and 91 @Image!='Integer' and 92 @Image!='Long' and 93 @Image!='Number' and 94 @Image!='Short' and 95 @Image!='String' ]"/> 59 96 </properties> 60 97 </rule> 61 <rule ref=" rulesets/java/naming.xml/LongVariable">98 <rule ref="category/java/codestyle.xml/LongVariable"> 62 99 <properties> 63 100 <property name="minimum" value="44"/> 64 101 </properties> 65 102 </rule> 66 <rule ref="rulesets/java/optimizations.xml"> 67 <exclude name="LocalVariableCouldBeFinal"/> 68 <exclude name="MethodArgumentCouldBeFinal"/> 69 <exclude name="AvoidInstantiatingObjectsInLoops"/> 70 <exclude name="PrematureDeclaration"/> 71 <exclude name="SimplifyStartsWith"/> 72 <exclude name="UseStringBufferForStringAppends"/> 73 <exclude name="UseArrayListInsteadOfVector"/> 103 <rule ref="category/java/design.xml"> 104 <exclude name="AvoidCatchingGenericException"/> 105 <exclude name="AvoidDeeplyNestedIfStmts"/> 106 <exclude name="AvoidRethrowingException"/> 107 <exclude name="CollapsibleIfStatements"/> 108 <exclude name="CouplingBetweenObjects"/> 109 <exclude name="CyclomaticComplexity"/> 110 <exclude name="DataClass"/> 111 <exclude name="ExceptionAsFlowControl"/> 112 <exclude name="ExcessiveClassLength"/> 113 <exclude name="ExcessiveImports"/> 114 <exclude name="ExcessiveMethodLength"/> 115 <exclude name="ExcessiveParameterList"/> 116 <exclude name="ExcessivePublicCount"/> 117 <exclude name="GodClass"/> 118 <exclude name="ImmutableField"/> 119 <exclude name="LawOfDemeter"/> 120 <exclude name="LoosePackageCoupling"/> 121 <exclude name="NcssCount"/> 122 <exclude name="NPathComplexity"/> 123 <exclude name="SignatureDeclareThrowsException"/> 124 <exclude name="SimplifiedTernary"/> 125 <exclude name="SimplifyConditional"/> 126 <exclude name="SingularField"/> 127 <exclude name="SwitchDensity"/> 128 <exclude name="TooManyFields"/> 129 <exclude name="TooManyMethods"/> 130 <exclude name="UseObjectForClearerAPI"/> 131 <exclude name="UselessOverridingMethod"/> 132 <exclude name="UseUtilityClass"/> 74 133 </rule> 75 <rule ref="rulesets/java/strictexception.xml"> 76 <exclude name="ExceptionAsFlowControl"/> 77 <exclude name="AvoidCatchingGenericException"/> 78 <exclude name="AvoidCatchingNPE"/> 79 <exclude name="AvoidRethrowingException"/> 80 </rule> 81 <rule ref="rulesets/java/strings.xml"> 82 <exclude name="AvoidDuplicateLiterals"/> 83 <exclude name="ConsecutiveLiteralAppends"/> 84 <exclude name="AvoidStringBufferField"/> 85 <exclude name="StringToString"/> 86 <exclude name="UselessStringValueOf"/> 87 <exclude name="InefficientEmptyStringCheck"/> 88 </rule> 89 <rule ref="rulesets/java/typeresolution.xml"> 90 <exclude name="LooseCoupling"/> 91 <exclude name="SignatureDeclareThrowsException"/> 92 </rule> 93 <rule ref="rulesets/java/typeresolution.xml/SignatureDeclareThrowsException"> 134 <rule ref="category/java/design.xml/SignatureDeclareThrowsException"> 94 135 <properties> 95 136 <property name="violationSuppressXPath" value="//MethodDeclaration/../Annotation/MarkerAnnotation/Name[@Image='Override']"/> … … 97 138 </properties> 98 139 </rule> 99 <rule ref="rulesets/java/unnecessary.xml"> 100 <exclude name="UselessParentheses"/> 101 <exclude name="UselessOverridingMethod"/> 140 <rule ref="category/java/errorprone.xml"> 141 <exclude name="AssignmentInOperand"/> 142 <exclude name="AssignmentToNonFinalStatic"/> 143 <exclude name="AvoidBranchingStatementAsLastInLoop"/> 144 <exclude name="AvoidCatchingNPE"/> 145 <exclude name="AvoidDuplicateLiterals"/> 146 <exclude name="AvoidFieldNameMatchingMethodName"/> 147 <exclude name="AvoidFieldNameMatchingTypeName"/> 148 <exclude name="AvoidInstanceofChecksInCatchClause"/> 149 <exclude name="AvoidLiteralsInIfCondition"/> 150 <exclude name="BeanMembersShouldSerialize"/> 151 <exclude name="CompareObjectsWithEquals"/> 152 <exclude name="ConstructorCallsOverridableMethod"/> 153 <exclude name="DataflowAnomalyAnalysis"/> 154 <exclude name="DoNotCallGarbageCollectionExplicitly"/> 155 <exclude name="DoNotCallSystemExit"/> 156 <exclude name="DontImportSun"/> 157 <exclude name="EmptyIfStmt"/> 158 <exclude name="EmptyWhileStmt"/> 159 <exclude name="MissingBreakInSwitch"/> 160 <exclude name="MissingSerialVersionUID"/> 161 <exclude name="MissingStaticMethodInNonInstantiatableClass"/> 162 <exclude name="NonStaticInitializer"/> 163 <exclude name="NullAssignment"/> 164 <exclude name="ReturnEmptyArrayRatherThanNull"/> 165 <exclude name="SimpleDateFormatNeedsLocale"/> 166 <exclude name="SingleMethodSingleton"/> 167 <exclude name="SingletonClassReturningNewInstance"/> 168 <exclude name="TestClassWithoutTestCases"/> 169 <exclude name="UseProperClassLoader"/> 102 170 </rule> 103 <rule ref="rulesets/java/unusedcode.xml"> 104 <exclude name="UnusedFormalParameter"/> 105 </rule> 106 <rule ref="rulesets/java/unusedcode.xml/UnusedFormalParameter"> 107 <properties> 108 <property name="violationSuppressXPath" value="//Annotation[MarkerAnnotation/Name/@Image='Deprecated']/..[MethodDeclaration|ConstructorDeclaration]"/> 109 </properties> 171 <rule ref="category/java/performance.xml"> 172 <exclude name="AvoidFileStream"/> 173 <exclude name="AvoidInstantiatingObjectsInLoops"/> 174 <exclude name="AvoidUsingShortType"/> 175 <exclude name="ConsecutiveLiteralAppends"/> 176 <exclude name="InefficientEmptyStringCheck"/> 177 <exclude name="OptimizableToArrayCall"/> 178 <exclude name="SimplifyStartsWith"/> 179 <exclude name="StringToString"/> 180 <exclude name="TooFewBranchesForASwitchStatement"/> 181 <exclude name="UseArrayListInsteadOfVector"/> 182 <exclude name="UselessStringValueOf"/> 183 <exclude name="UseStringBufferForStringAppends"/> 110 184 </rule> 111 185
Note:
See TracChangeset
for help on using the changeset viewer.