From eb8efcf252fe3a6d61e15f426961464994f17dd2 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Sun, 28 Jan 2007 19:29:39 +0000
Subject: [PATCH] Enable the use of the caching mechanism used by CheckStyle to significantly reduce the time required for it to run during subsequent builds.
---
opendj-sdk/opends/ext/checkstyle/opends-functest-checkstyle.xml | 2 ++
opendj-sdk/opends/build.xml | 8 +++++---
opendj-sdk/opends/ext/checkstyle/opends-unittest-checkstyle.xml | 2 ++
opendj-sdk/opends/ext/checkstyle/opends-doctarget-checkstyle.xml | 2 ++
opendj-sdk/opends/ext/checkstyle/opends-checkstyle.xml | 2 ++
5 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/opendj-sdk/opends/build.xml b/opendj-sdk/opends/build.xml
index 01c1aba..b2cab9e 100644
--- a/opendj-sdk/opends/build.xml
+++ b/opendj-sdk/opends/build.xml
@@ -108,8 +108,9 @@
<property name="ant.dir" location="${ext.dir}/ant" />
<property name="ant.lib.dir" location="${ant.dir}/lib" />
- <!-- Properties for the checkstyle tool. -->
- <property name="checkstyle.dir" location="${ext.dir}/checkstyle" />
+ <!-- Properties for the checkstyle tool. -->
+ <property name="checkstyle.dir" location="${ext.dir}/checkstyle" />
+ <property name="checkstyle.cache.dir" location=".checkstyle-cache" />
<!-- Properties for the SVNKit tool. -->
<property name="svnkit.dir" location="${ext.dir}/svnkit" />
@@ -287,6 +288,7 @@
<!-- Ensure that the source code meets basic style requirements. -->
<target name="checkstyle" description="Perform basic source style checks">
+ <mkdir dir="${checkstyle.cache.dir}" />
<taskdef resource="checkstyletask.properties"
classpath="${checkstyle.dir}/checkstyle-all-4.1.jar" />
@@ -304,7 +306,7 @@
</checkstyle>
<checkstyle config="${checkstyle.dir}/opends-checkstyle.xml"
- failOnViolation="true">
+ failOnViolation="true">
<fileset dir="${statuspanel.src.dir}" includes="**/*.java" />
<formatter type="plain" />
</checkstyle>
diff --git a/opendj-sdk/opends/ext/checkstyle/opends-checkstyle.xml b/opendj-sdk/opends/ext/checkstyle/opends-checkstyle.xml
index 84aa9af..bd8582b 100644
--- a/opendj-sdk/opends/ext/checkstyle/opends-checkstyle.xml
+++ b/opendj-sdk/opends/ext/checkstyle/opends-checkstyle.xml
@@ -6,6 +6,8 @@
<module name="Checker">
<module name="TreeWalker">
+ <property name="cacheFile" value="${basedir}/.checkstyle-cache/opends-checkstyle.cache" />
+
<!-- Ensure that each source file starts with the appropriate header -->
<module name="Header">
<property name="headerFile" value="${basedir}/ext/checkstyle/opends.sourceheader" />
diff --git a/opendj-sdk/opends/ext/checkstyle/opends-doctarget-checkstyle.xml b/opendj-sdk/opends/ext/checkstyle/opends-doctarget-checkstyle.xml
index e6c72b5..cb8b943 100644
--- a/opendj-sdk/opends/ext/checkstyle/opends-doctarget-checkstyle.xml
+++ b/opendj-sdk/opends/ext/checkstyle/opends-doctarget-checkstyle.xml
@@ -6,6 +6,8 @@
<module name="Checker">
<module name="TreeWalker">
+ <property name="cacheFile" value="${basedir}/.checkstyle-cache/opends-doctarget-checkstyle.cache" />
+
<!-- Ensure that all methods (including private) are documented -->
<module name="JavadocMethod">
<property name="scope" value="private" />
diff --git a/opendj-sdk/opends/ext/checkstyle/opends-functest-checkstyle.xml b/opendj-sdk/opends/ext/checkstyle/opends-functest-checkstyle.xml
index 664a714..fef53d1 100644
--- a/opendj-sdk/opends/ext/checkstyle/opends-functest-checkstyle.xml
+++ b/opendj-sdk/opends/ext/checkstyle/opends-functest-checkstyle.xml
@@ -6,6 +6,8 @@
<module name="Checker">
<module name="TreeWalker">
+ <property name="cacheFile" value="${basedir}/.checkstyle-cache/opends-functest-checkstyle.cache" />
+
<!-- Ensure that each source file starts with the appropriate header -->
<module name="Header">
<property name="headerFile" value="${basedir}/ext/checkstyle/opends.sourceheader" />
diff --git a/opendj-sdk/opends/ext/checkstyle/opends-unittest-checkstyle.xml b/opendj-sdk/opends/ext/checkstyle/opends-unittest-checkstyle.xml
index 664a714..f5f791a 100644
--- a/opendj-sdk/opends/ext/checkstyle/opends-unittest-checkstyle.xml
+++ b/opendj-sdk/opends/ext/checkstyle/opends-unittest-checkstyle.xml
@@ -6,6 +6,8 @@
<module name="Checker">
<module name="TreeWalker">
+ <property name="cacheFile" value="${basedir}/.checkstyle-cache/opends-unittest-checkstyle.cache" />
+
<!-- Ensure that each source file starts with the appropriate header -->
<module name="Header">
<property name="headerFile" value="${basedir}/ext/checkstyle/opends.sourceheader" />
--
Gitblit v1.10.0