Author: [email protected]
Date: Tue Jun 23 09:20:54 2009
New Revision: 5612
Modified:
trunk/build.xml
trunk/common.ant.xml
trunk/samples/common.ant.xml
Log:
Fixing the checkstyle and presubmit rules. Checkstyle never reached the
"where's the log?" <echo>, so changed <checkstyle> to non-failing and the
<echo> to a <fail ... if ...>. Samples are in upper-case directories, but
${project.build} is lowercase, so allow checkstyle output directory to be
overrridden. And jiggle the order of presubmit, to fail fast.
Review by: zundel
Modified: trunk/build.xml
==============================================================================
--- trunk/build.xml (original)
+++ trunk/build.xml Tue Jun 23 09:20:54 2009
@@ -130,7 +130,7 @@
<delete dir="${gwt.build}" />
</target>
- <target name ="presubmit" description="[action] Runs
checkstyle,apichecker, and all tests"
depends="test,apicheck-nobuild,checkstyle">
+ <target name ="presubmit" description="[action] Runs
checkstyle,apichecker, and all tests"
depends="dist-dev,apicheck-nobuild,checkstyle,test">
</target>
<target name="apicheck-nobuild"
Modified: trunk/common.ant.xml
==============================================================================
--- trunk/common.ant.xml (original)
+++ trunk/common.ant.xml Tue Jun 23 09:20:54 2009
@@ -272,15 +272,16 @@
</macrodef>
<macrodef name="gwt.checkstyle">
+ <attribute name="outputdirectory" default="${project.build}"/>
<element name="sourcepath" implicit="yes" optional="true" />
<sequential>
<taskdef resource="checkstyletask.properties"
classpath="${gwt.tools.antlib}/checkstyle-all-4.2.jar;${gwt.build.lib}/gwt-customchecks.jar"
/>
- <checkstyle
config="${gwt.root}/eclipse/settings/code-style/gwt-checkstyle.xml"
maxErrors="0">
- <formatter type="xml" toFile="${project.build}/checkstyle_log.xml"/>
+ <checkstyle
config="${gwt.root}/eclipse/settings/code-style/gwt-checkstyle.xml"
maxErrors="0" failOnViolation="false"
failureProperty="gwt.checkstyle.failed">
+ <formatter type="xml"
toFile="@{outputdirectory}/checkstyle_log.xml"/>
<property key="checkstyle.header.file"
file="${gwt.root}/eclipse/settings/code-style/google.header" />
<sourcepath />
</checkstyle>
- <echo message="Checkstyle messages are reported in checkstyle_log.xml
located at ${project.build}" />
+ <fail message="Checkstyle errors exist, and are reported in
checkstyle_log.xml located at @{outputdirectory}"
if="gwt.checkstyle.failed" />
</sequential>
</macrodef>
Modified: trunk/samples/common.ant.xml
==============================================================================
--- trunk/samples/common.ant.xml (original)
+++ trunk/samples/common.ant.xml Tue Jun 23 09:20:54 2009
@@ -107,7 +107,7 @@
<target name="build" depends="source, compile, gwtc, scripts"
description="Build and package this project" />
<target name="checkstyle" description="Static analysis of source">
- <gwt.checkstyle>
+ <gwt.checkstyle outputdirectory="${sample.build}">
<fileset dir="src" />
</gwt.checkstyle>
</target>
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---