summaryrefslogtreecommitdiff
path: root/check.xml
diff options
context:
space:
mode:
authorJan Matèrne <jhm@apache.org>2016-05-27 15:28:17 +0200
committerJan Matèrne <jhm@apache.org>2016-05-27 15:28:17 +0200
commit600c69d0add42a482ff9a40b4aff98d904e9ae50 (patch)
tree944efad33fbd6c7038fc9987a7e002f08eaab86f /check.xml
parentd28974c284b98cbd5c52c847451cee279ac9821f (diff)
downloadant-600c69d0add42a482ff9a40b4aff98d904e9ae50.tar.gz
check.xml: make Simian work again
Diffstat (limited to 'check.xml')
-rw-r--r--check.xml95
1 files changed, 72 insertions, 23 deletions
diff --git a/check.xml b/check.xml
index a6f6bc7b5..927f1d7b2 100644
--- a/check.xml
+++ b/check.xml
@@ -34,35 +34,48 @@
</description>
<import file="build.xml"/>
+
<property name="config.dir" location="${etc.dir}/checkstyle"/>
- <property name="checkstyle.reportdir" location="${build.dir}/reports/checkstyle"/>
- <property name="checkstyle.raw" location="${checkstyle.reportdir}/raw.xml"/>
- <property name="stylesheet.html" location="${config.dir}/checkstyle-frames.xsl"/>
- <property name="stylesheet.html.sorted" location="${config.dir}/checkstyle-frames-sortby-check.xsl"/>
- <property name="stylesheet.text" location="${config.dir}/checkstyle-text.xsl"/>
- <property name="stylesheet.xdoc" location="${config.dir}/checkstyle-xdoc.xsl"/>
-
- <property name="checkstyle.basedir" location="${java.dir}"/>
-
<!-- Ant Checkstyle report -->
- <property name="tocheck" value="**/*.java"/>
- <property name="javadoc.scope" value="public"/>
+ <property name="checkstyle.reportdir"
+ location="${build.dir}/reports/checkstyle"
+ description="Where to store Checkstyle reports"/>
+ <property name="checkstyle.raw"
+ location="${checkstyle.reportdir}/raw.xml"
+ description="Name of Checkstyle XML-Report"/>
+ <property name="stylesheet.html"
+ location="${config.dir}/checkstyle-frames.xsl"
+ description="Name of Checkstyle XSLT for generating HTML"/>
+ <property name="stylesheet.html.sorted"
+ location="${config.dir}/checkstyle-frames-sortby-check.xsl"
+ description="Name of Checkstyle XSLT for generating 2nd HTML"/>
+ <property name="stylesheet.text"
+ location="${config.dir}/checkstyle-text.xsl"
+ description="Name of Checkstyle XSLT for generating plain text"/>
+ <property name="stylesheet.xdoc"
+ location="${config.dir}/checkstyle-xdoc.xsl"
+ description="Name of Checkstyle XSLT for generating XDOC"/>
+
+ <property name="checkstyle.basedir"
+ location="${java.dir}"
+ description="Where are the Java sources to check"/>
+ <property name="tocheck"
+ value="**/*.java"
+ description="Include pattern of the files to check"/>
- <taskdef resource="simiantask.properties"/>
-
<!-- Findbugs: Running Findbugs -->
- <property name="findbugs.reportdir"
- location="${build.dir}/reports/findbugs"
+ <property name="findbugs.reportdir"
+ location="${build.dir}/reports/findbugs"
description="Where to store Findbugs results"/>
- <property name="findbugs.raw"
- value="raw.xml"
+ <property name="findbugs.raw"
+ value="raw.xml"
description="Findbugs Output xml-file"/>
- <property name="findbugs.xsl"
- value="fancy.xsl"
+ <property name="findbugs.xsl"
+ value="fancy.xsl"
description="Which XSL to use for generating Output: default, fancy, plain, summary"/>
- <property name="findbugs.jvmargs"
- value="-Xms128m -Xmx512m"
+ <property name="findbugs.jvmargs"
+ value="-Xms128m -Xmx512m"
description="JVMArgs for invoking Findbugs"/>
<!-- RAT Release Auditing Tool -->
@@ -76,6 +89,19 @@
value="0.11"
description="Which Version of RAT to use"/>
+ <!-- Simian -->
+ <property name="simian.version"
+ value="2.4.0"
+ description="Which Version of Simian to use"/>
+ <property name="simian.uri"
+ value="http://www.harukizaemon.com/simian/simian-${simian.version}.tar.gz"
+ description="Where to get Simian"/>
+ <property name="simian.lib.dir"
+ value="${build.dir}/simian-lib"
+ description="Where to store Simian resources"/>
+ <property name="simian.report.dir"
+ value="${build.dir}/simian"
+ description="Where to store Simian reports"/>
<target name="init-ivy">
@@ -154,11 +180,34 @@
</target>
<target name="simiancheck" description="--> runs the check for duplicates">
- <simian>
+ <available property="simian.jar.present" file="${simian.lib.dir}/simian-${simian.version}.jar"/>
+ <sequential unless:set="simian.jar.present">
+ <mkdir dir="${simian.lib.dir}"/>
+ <get src="${simian.uri}" dest="${simian.lib.dir}"/>
+ <gunzip src="${simian.lib.dir}/simian-${simian.version}.tar.gz" dest="${simian.lib.dir}/simian-${simian.version}.tar"/>
+ <untar src="${simian.lib.dir}/simian-${simian.version}.tar" dest="${simian.lib.dir}">
+ <patternset>
+ <include name="**/simian*.jar"/>
+ <include name="**/simian*.xsl"/>
+ </patternset>
+ <flattenmapper/>
+ </untar>
+ </sequential>
+
+ <taskdef resource="simiantask.properties">
+ <classpath>
+ <fileset dir="${simian.lib.dir}" includes="*.jar"/>
+ </classpath>
+ </taskdef>
+ <mkdir dir="${simian.report.dir}"/>
+ <simian failureProperty="simian.duplicates.found">
<fileset dir="${java.dir}" />
+ <formatter type="plain" toFile="${simian.report.dir}/simian-log.txt"/>
+ <formatter type="xml" toFile="${simian.report.dir}/simian-log.xml"/>
</simian>
+ <xslt in="${simian.report.dir}/simian-log.xml" style="${simian.lib.dir}/simian.xsl" out="${simian.report.dir}/simian.html"/>
</target>
-
+
<target name="fixTS" description="--> fix checkstyle errors 'Line has trailing spaces'">
<fail message="Define path to java file 'path'">
<condition><not><isset property="path"/></not></condition>