Author: rwhitcomb Date: Fri Apr 27 18:37:48 2018 New Revision: 1830386 URL: http://svn.apache.org/viewvc?rev=1830386&view=rev Log: PIVOT-1032: Update the "build.xml" to include the "check-style" target. NOTE: this won't work without the "checkstyle...-all.jar" file in the ANT_HOME/lib directory.
Modified: pivot/trunk/build.xml Modified: pivot/trunk/build.xml URL: http://svn.apache.org/viewvc/pivot/trunk/build.xml?rev=1830386&r1=1830385&r2=1830386&view=diff ============================================================================== --- pivot/trunk/build.xml (original) +++ pivot/trunk/build.xml Fri Apr 27 18:37:48 2018 @@ -18,6 +18,7 @@ limitations under the License. <project name="pivot" default="environment-info" xmlns:artifact="antlib:org.apache.maven.artifact.ant" + xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant" > <!-- Classpath-related properties --> <property environment="env"/> @@ -989,4 +990,22 @@ limitations under the License. <fileset refid="trimfiles"/> </replaceregexp> </target> + + <!-- Run our custom checkstyle on all the source --> + <target name="check-style"> + <cs:checkstyle config="pivot_checks.xml" failOnViolation="false"> + <fileset dir="."> + <include name="**/*.java"/> + </fileset> + <cs:formatter type="plain" toFile="style_errors.log"/> + </cs:checkstyle> + <javac srcdir="." includeantruntime="false"> + <include name="StyleErrors.java"/> + </javac> + <java dir="." classname="StyleErrors" fork="true" output="style_summary.log" logError="true"> + <arg value="style_errors.log"/> + </java> + <echo message="Style check results in "style_errors.log" and "style_summary.log""/> + </target> + </project>