Changeset 11713 in josm for trunk/build.xml


Ignore:
Timestamp:
2017-03-10T02:28:00+01:00 (8 years ago)
Author:
Don-vip
Message:

add Ant target to run PMD (only few rules for now), fix violations

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1212junit*.properties
        1313foobar
         14pmd-josm.xml
  • trunk/build.xml

    r11681 r11713  
    4545            <pathelement path="${groovy.jar}"/>
    4646            <pathelement path="tools/findbugs/annotations.jar"/>
     47        </path>
     48        <path id="pmd.classpath">
     49            <fileset dir="${base.dir}/tools/pmd/">
     50                <include name="*.jar"/>
     51            </fileset>
    4752        </path>
    4853    </target>
     
    756761        </findbugs>
    757762    </target>
     763
     764    <target name="pmd" depends="init-properties">
     765        <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpath="${toString:pmd.classpath}"/>
     766        <pmd shortFilenames="true" encoding="UTF-8">
     767            <sourceLanguage name="java" version="1.8" />
     768            <ruleset>${base.dir}/tools/pmd/josm-ruleset.xml</ruleset>
     769            <formatter type="text" toConsole="true" />
     770            <formatter type="xml" toFile="pmd-josm.xml">
     771                <param name="encoding" value="UTF-8" />
     772            </formatter>
     773            <fileset dir="${src.dir}">
     774                <include name="org/openstreetmap/josm/**/*.java"/>
     775                <exclude name="org/openstreetmap/josm/gui/mappaint/mapcss/parsergen/*.java" />
     776            </fileset>
     777        </pmd>
     778    </target>
     779
    758780    <target name="run" depends="dist">
    759781        <java jar="${dist.dir}/josm-custom.jar" fork="true">
Note: See TracChangeset for help on using the changeset viewer.