Changeset 18332 in josm for trunk/tools


Ignore:
Timestamp:
2021-12-20T14:12:10+01:00 (3 years ago)
Author:
Don-vip
Message:

see #21596 - Update dependencies in ivy.xml and tools/ivy.xml (patch by taylor.smock)

Location:
trunk/tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/checkstyle/src/org/openstreetmap/josm/TopLevelJavadocCheck.java

    r13996 r18332  
    8787    public void visitToken(DetailAST ast) {
    8888        DetailAST parent = ast.getParent();
    89         if (parent == null || parent.getType() == TokenTypes.EOF) {
     89        if (parent == null || parent.getType() == TokenTypes.COMPILATION_UNIT) {
    9090            foundTopLevelClass = true;
    9191            if (!hasJavadoc(ast)) {
  • trunk/tools/ivy.xml

    r18331 r18332  
    1717        <dependency org="net.java.dev.javacc" name="javacc" rev="7.0.10" conf="javacc->default"/>
    1818        <!-- checkstyle->default -->
    19         <dependency org="com.puppycrawl.tools" name="checkstyle" rev="8.44" conf="checkstyle->default"/>
     19        <dependency org="com.puppycrawl.tools" name="checkstyle" rev="9.2" conf="checkstyle->default"/>
    2020        <!-- proguard->default -->
    2121        <dependency org="com.guardsquare" name="proguard-ant" rev="7.2.0-beta4" conf="proguard->default"/>
    2222        <!-- pmd->default -->
    23         <dependency org="net.sourceforge.pmd" name="pmd-core" rev="6.20.0" conf="pmd->default"/>
    24         <dependency org="net.sourceforge.pmd" name="pmd-java" rev="6.20.0" conf="pmd->default"/>
     23        <dependency org="net.sourceforge.pmd" name="pmd-core" rev="6.41.0" conf="pmd->default"/>
     24        <dependency org="net.sourceforge.pmd" name="pmd-java" rev="6.41.0" conf="pmd->default"/>
    2525        <dependency org="net.sourceforge.saxon" name="saxon" rev="9.1.0.8" conf="pmd->default">
    2626            <artifact name="saxon" type="jar"/>
     
    2828        </dependency>
    2929        <!-- spotbugs->default -->
    30         <dependency org="com.github.spotbugs" name="spotbugs" rev="4.2.3" conf="spotbugs->default"/>
    31         <dependency org="com.github.spotbugs" name="spotbugs-ant" rev="4.2.3" conf="spotbugs->default"/>
     30        <dependency org="com.github.spotbugs" name="spotbugs" rev="4.5.2" conf="spotbugs->default"/>
     31        <dependency org="com.github.spotbugs" name="spotbugs-ant" rev="4.5.2" conf="spotbugs->default"/>
    3232        <!-- errorprone->default -->
    33         <dependency org="com.google.errorprone" name="error_prone_core" rev="2.8.1" conf="errorprone->default"/>
     33        <dependency org="com.google.errorprone" name="error_prone_core" rev="2.10.0" conf="errorprone->default"/>
    3434        <!-- errorprone->default -->
    3535        <dependency org="com.google.errorprone" name="javac" rev="9+181-r4173-1" conf="errorprone_javac->default"/>
  • trunk/tools/pmd/josm-ruleset.xml

    r15588 r18332  
    44    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    55    xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
    6  
     6
    77  <description>JOSM PMD ruleset</description>
    8  
     8
    99  <rule ref="category/java/bestpractices.xml">
    1010    <exclude name="AccessorClassGeneration"/>
     
    2222    <exclude name="JUnit4TestShouldUseAfterAnnotation"/>
    2323    <exclude name="JUnit4TestShouldUseTestAnnotation"/>
     24    <exclude name="LiteralsFirstInComparisons" reason="Introduced in 6.24, some positives in source code at this time. Replaces PositionLiteralsFirstInComparisons."/>
    2425    <exclude name="LooseCoupling"/>
    2526    <exclude name="MethodReturnsInternalArray"/>
    2627    <exclude name="OneDeclarationPerLine"/>
    27     <exclude name="PositionLiteralsFirstInComparisons"/>
    2828    <exclude name="PreserveStackTrace"/>
    2929    <exclude name="ReplaceHashtableWithMap"/>
    3030    <exclude name="SwitchStmtsShouldHaveDefault"/>
    3131    <exclude name="SystemPrintln"/>
     32    <exclude name="UnusedAssignment" reason="Introduced in 6.26, some number of positives in source code at this time"/>
    3233    <exclude name="UnusedFormalParameter"/>
     34    <exclude name="UnusedPrivateMethod" reason="Broken since PMD 6.33, see https://github.com/pmd/pmd/issues/3468"/>
    3335    <exclude name="UseVarargs"/>
    3436  </rule>
     
    4042  <rule ref="category/java/bestpractices.xml/UnusedFormalParameter">
    4143    <properties>
    42         <property name="violationSuppressXPath" value="//Annotation[MarkerAnnotation/Name/@Image='Deprecated']/..[MethodDeclaration|ConstructorDeclaration]"/>
     44        <property name="violationSuppressXPath" value="//Annotation[MarkerAnnotation/Name/@SimpleName='Deprecated']/..[MethodDeclaration|ConstructorDeclaration]"/>
    4345    </properties>
    4446  </rule>
     
    7375    <exclude name="ShortVariable"/>
    7476    <exclude name="TooManyStaticImports"/>
     77    <exclude name="UnnecessaryCast" reason="Introduced in 6.24, some positives in source code at this time"/>
    7578    <exclude name="UnnecessaryConstructor"/>
     79    <exclude name="UseUnderscoresInNumericLiterals"/>
    7680    <exclude name="UselessParentheses"/>
    77     <exclude name="UseUnderscoresInNumericLiterals"/>
    7881    <exclude name="VariableNamingConventions"/>
    7982    <exclude name="WhileLoopsMustUseBraces"/>
     
    8184  <rule ref="category/java/codestyle.xml/ShortMethodName">
    8285    <properties>
    83         <property name="violationSuppressXPath" value="//MethodDeclarator[@Image='at' or @Image='ht' or @Image='of' or @Image='ok' or @Image='tr']
    84           | //MethodDeclarator/../../Annotation/MarkerAnnotation/Name[@Image='Deprecated']
    85           | //MethodDeclarator/../../../..[@Image='LambertConformalConic']"/>
     86        <property name="violationSuppressXPath" value="//MethodDeclaration[@Name='at' or @Name='ht' or @Name='of' or @Name='ok' or @Name='tr']
     87          | //MethodDeclaration/../../Annotation/MarkerAnnotation/Name[@Image='Deprecated']
     88          | //MethodDeclaration/../../../..[@Image='LambertConformalConic']"/>
    8689    </properties>
    8790  </rule>
    8891  <rule ref="category/java/codestyle.xml/MethodNamingConventions">
    8992    <properties>
    90         <property name="violationSuppressXPath" value="//MethodDeclarator/../../../..[@Image='Functions' or @Image='PseudoClasses' or @Image='Role' or @Image='TaggingPreset']"/>
     93        <property name="violationSuppressXPath" value="//MethodDeclaration/../../..[@SimpleName='Functions' or @SimpleName='PseudoClasses' or @SimpleName='Role' or @SimpleName='TaggingPreset']"/>
    9194    </properties>
    9295  </rule>
     
    9699        <property name="violationSuppressXPath" value="//FieldDeclaration[@Public='true']
    97100          | //FieldDeclaration/../Annotation/MarkerAnnotation/Name[@Image='pref']
    98           | //FieldDeclaration/Type/ReferenceType/ClassOrInterfaceType[@Image!='Boolean' and 
    99                                                                        @Image!='Byte' and 
    100                                                                        @Image!='Character' and 
    101                                                                        @Image!='Class' and 
    102                                                                        @Image!='Double' and 
    103                                                                        @Image!='Enum' and 
    104                                                                        @Image!='Float' and 
     101          | //FieldDeclaration/Type/ReferenceType/ClassOrInterfaceType[@Image!='Boolean' and
     102                                                                       @Image!='Byte' and
     103                                                                       @Image!='Character' and
     104                                                                       @Image!='Class' and
     105                                                                       @Image!='Double' and
     106                                                                       @Image!='Enum' and
     107                                                                       @Image!='Float' and
    105108                                                                       @Image!='Integer' and
    106109                                                                       @Image!='Long' and
    107110                                                                       @Image!='Number' and
    108                                                                        @Image!='Short' and 
     111                                                                       @Image!='Short' and
    109112                                                                       @Image!='String' ]"/>
    110113    </properties>
     
    119122    <exclude name="AvoidDeeplyNestedIfStmts"/>
    120123    <exclude name="AvoidRethrowingException"/>
     124    <exclude name="CognitiveComplexity" reason="Introduced in 6.35, some number of positives in source code at this time"/>
    121125    <exclude name="CollapsibleIfStatements"/>
    122126    <exclude name="CouplingBetweenObjects"/>
     
    133137    <exclude name="LawOfDemeter"/>
    134138    <exclude name="LoosePackageCoupling"/>
     139    <exclude name="MutableStaticState" reason="Introduced in 6.35, some number of positives in source code at this time"/>
    135140    <exclude name="NcssCount"/>
    136141    <exclude name="NPathComplexity"/>
     
    168173    <exclude name="ConstructorCallsOverridableMethod"/>
    169174    <exclude name="DataflowAnomalyAnalysis"/>
    170     <exclude name="DoNotCallSystemExit"/>
     175    <exclude name="DoNotTerminateVM"/>
    171176    <exclude name="DontImportSun"/>
    172177    <exclude name="EmptyIfStmt"/>
    173178    <exclude name="EmptyWhileStmt"/>
    174     <exclude name="MissingBreakInSwitch"/>
     179    <exclude name="ImplicitSwitchFallThrough"/>
    175180    <exclude name="MissingSerialVersionUID"/>
    176181    <exclude name="MissingStaticMethodInNonInstantiatableClass"/>
     
    178183    <exclude name="NullAssignment"/>
    179184    <exclude name="ReturnEmptyArrayRatherThanNull"/>
     185    <exclude name="ReturnEmptyCollectionRatherThanNull" reason="Introduced in 6.37, there are positives in source code at this time"/>
    180186    <exclude name="SimpleDateFormatNeedsLocale"/>
    181187    <exclude name="SingleMethodSingleton"/>
     
    183189    <exclude name="TestClassWithoutTestCases"/>
    184190    <exclude name="UseProperClassLoader"/>
     191  </rule>
     192  <rule ref="category/java/errorprone.xml/AvoidAccessibilityAlteration">
     193    <properties>
     194      <property name="violationSuppressXPath" value="//MethodDeclaration/../../..[@SimpleName='ReflectionUtils']"/>
     195    </properties>
    185196  </rule>
    186197  <rule ref="category/java/performance.xml">
     
    190201    <exclude name="InefficientEmptyStringCheck"/>
    191202    <exclude name="SimplifyStartsWith"/>
     203    <exclude name="InsufficientStringBufferDeclaration" reason="PMD 6.40 has a bug where it doesn't properly count appended strings in if statements."/>
    192204    <exclude name="TooFewBranchesForASwitchStatement"/>
    193205    <exclude name="UseArrayListInsteadOfVector"/>
Note: See TracChangeset for help on using the changeset viewer.