[Picross-commit] SF.net SVN: picross: [5] trunk
Status: Pre-Alpha
Brought to you by:
yvan_norsa
|
From: <yva...@us...> - 2007-06-05 07:37:02
|
Revision: 5
http://picross.svn.sourceforge.net/picross/?rev=5&view=rev
Author: yvan_norsa
Date: 2007-06-05 00:37:02 -0700 (Tue, 05 Jun 2007)
Log Message:
-----------
added support for checkstyle and findbugs
Modified Paths:
--------------
trunk/build.xml
Added Paths:
-----------
trunk/bugsFilter.xml
trunk/checkstyle.sample.properties
Added: trunk/bugsFilter.xml
===================================================================
--- trunk/bugsFilter.xml (rev 0)
+++ trunk/bugsFilter.xml 2007-06-05 07:37:02 UTC (rev 5)
@@ -0,0 +1,5 @@
+<FindBugsFilter>
+ <Match classregex=".*">
+ <Bug pattern="CLI_CONSTANT_LIST_INDEX,S508C_SET_COMP_COLOR" />
+ </Match>
+</FindBugsFilter>
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2007-06-05 06:53:14 UTC (rev 4)
+++ trunk/build.xml 2007-06-05 07:37:02 UTC (rev 5)
@@ -82,4 +82,73 @@
<target name="rebuild"
depends="clean, compile" />
+
+ <property file="checkstyle.properties" />
+
+ <target name="-check-checkstyle">
+ <fail unless="checkstyle.jar"
+ message="You need checkstyle.properties to call this target" />
+ </target>
+
+ <target name="checkstyle"
+ depends="-check-checkstyle,rebuild">
+ <taskdef resource="checkstyletask.properties"
+ classpath="${checkstyle.jar}" />
+
+ <checkstyle configURL="${checkstyle.url}"
+ failOnViolation="false"
+ failureProperty="checkstyle-failed">
+ <classpath refid="classpath" />
+
+ <formatter type="xml"
+ tofile="checkstyle.xml" />
+
+ <!-- Pour tous les fichiers source sauf les tests -->
+ <fileset dir="${src.dir}"
+ includes="**/*.java" />
+ </checkstyle>
+
+ <xslt in="checkstyle.xml"
+ out="checkstyle.html">
+ <style>
+ <url url="${checkstyle.xsl}" />
+ </style>
+ </xslt>
+
+ <fail message="Checkstyle failed">
+ <condition>
+ <isset property="checkstyle-failed" />
+ </condition>
+ </fail>
+ </target>
+
+ <property environment="env" />
+
+ <target name="-check-findbugs">
+ <available property="has-findbugs"
+ file="${env.FINDBUGS_HOME}/lib/findbugs.jar" />
+
+ <fail unless="has-findbugs"
+ message="You need to set the FINDBUGS_HOME variable to call this target" />
+ </target>
+
+ <target name="findbugs"
+ depends="-check-findbugs,rebuild">
+ <taskdef name="findbugs"
+ classname="edu.umd.cs.findbugs.anttask.FindBugsTask" />
+
+ <findbugs home="${env.FINDBUGS_HOME}"
+ reportLevel="low"
+ effort="max"
+ excludeFilter="bugsFilter.xml"
+ projectName="${ant.project.name}"
+ output="html"
+ outputFile="findbugs.html">
+ <class location="${build.dir}" />
+
+ <auxclasspath refid="classpath" />
+
+ <sourcePath path="${src.dir}" />
+ </findbugs>
+ </target>
</project>
\ No newline at end of file
Added: trunk/checkstyle.sample.properties
===================================================================
--- trunk/checkstyle.sample.properties (rev 0)
+++ trunk/checkstyle.sample.properties 2007-06-05 07:37:02 UTC (rev 5)
@@ -0,0 +1,3 @@
+checkstyle.jar=/path/checkstyle.jar
+checkstyle.url=http://picross.sourceforge.net/style.xml
+checkstyle.xsl=http://picross.sourceforge.net/checkstyle.xsl
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|