diff options
author | Kevin Smith <git@kismith.co.uk> | 2012-10-18 13:34:06 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-10-18 13:34:06 (GMT) |
commit | 595574d3fefb87741588371d37c2c35f3bb6a207 (patch) | |
tree | f7b26cf5eaeb9e5e8ccefa20be72ec0f8b515bb5 | |
parent | afe789b14ca03734d8012c79ffee2992b59d5fbb (diff) | |
download | stroke-595574d3fefb87741588371d37c2c35f3bb6a207.zip stroke-595574d3fefb87741588371d37c2c35f3bb6a207.tar.bz2 |
Include PMD checking
Change-Id: Ib4717891c591911e68a5b27b7af4e666b6296d48
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | build.xml | 19 |
2 files changed, 26 insertions, 3 deletions
@@ -17,8 +17,8 @@ dist/lib/stroke.jar: third-party/jzlib/jzlib.jar third-party/icu4j.jar third-par ant ${DEFINES} .PHONY : test -test: dist/lib/stroke.jar third-party/cobertura/cobertura.jar third-party/findbugs/lib/findbugs.jar - ant ${DEFINES} -DJUNIT_JAR=${JUNIT} -Dcobertura-jar=third-party/cobertura/cobertura.jar -Djakarta-oro-jar=third-party/cobertura/lib/jakarta-oro-2.0.8.jar -Dlog4j-jar=third-party/cobertura/lib/log4j-1.2.9.jar -Dasm-jar=third-party/cobertura/lib/asm-3.0.jar -Dasm-tree-jar=third-party/cobertura/lib/asm-tree-3.0.jar -Dfindbugs.home=third-party/findbugs test +test: dist/lib/stroke.jar third-party/cobertura/cobertura.jar third-party/findbugs/lib/findbugs.jar third-party/pmd/lib/pmd-5.0.0.jar + ant ${DEFINES} -DJUNIT_JAR=${JUNIT} -Dcobertura-jar=third-party/cobertura/cobertura.jar -Djakarta-oro-jar=third-party/cobertura/lib/jakarta-oro-2.0.8.jar -Dlog4j-jar=third-party/cobertura/lib/log4j-1.2.9.jar -Dasm-jar=third-party/cobertura/lib/asm-3.0.jar -Dasm-tree-jar=third-party/cobertura/lib/asm-tree-3.0.jar -Dfindbugs.home=third-party/findbugs -Dpmd.home=third-party/pmd test third-party/aalto/aalto-xml.jar: mkdir -p third-party/aalto @@ -52,6 +52,12 @@ third-party/findbugs/lib/findbugs.jar: tar -xvzf third-party/findbugs-2.0.1.tar.gz -C third-party/ mv third-party/findbugs-2.0.1 third-party/findbugs +third-party/pmd/lib/pmd-5.0.0.jar: + mkdir -p third-party + curl -L 'http://sourceforge.net/projects/pmd/files/pmd/5.0.0/pmd-bin-5.0.0.zip/download' -o third-party/pmd-bin-5.0.0.zip + unzip third-party/pmd-bin-5.0.0.zip -d third-party + mv third-party/pmd-bin-5.0.0 third-party/pmd + .git/hooks/commit-msg: curl -k https://git.swift.im/review/tools/hooks/commit-msg -o .git/hooks/commit-msg chmod u+x .git/hooks/commit-msg @@ -136,7 +136,24 @@ </findbugs> </target> - <target name="test" depends="compile-tests, instrument, run-tests, coverage, findbugs"> + <target name="pmd"> + <path id="pmd-jar"> + <fileset dir="${pmd.home}/lib"> + <include name="*.jar" /> + </fileset> + </path> + <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd-jar"/> + <pmd shortFilenames="true"> + <ruleset>rulesets/java/basic.xml</ruleset> + <ruleset>java-basic</ruleset> + <formatter type="xml" toFile="pmd.xml" /> + <fileset dir="${src}"> + <include name="**/*.java"/> + </fileset> + </pmd> + </target> + + <target name="test" depends="compile-tests, instrument, run-tests, coverage, findbugs, pmd"> </target> <target name="clean" |