Return-Path: Delivered-To: apmail-xml-axis-dev-archive@xml.apache.org Received: (qmail 15483 invoked by uid 500); 20 Jun 2002 15:17:56 -0000 Mailing-List: contact axis-dev-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@xml.apache.org Received: (qmail 15474 invoked by uid 500); 20 Jun 2002 15:17:56 -0000 Delivered-To: apmail-xml-axis-cvs@apache.org Date: 20 Jun 2002 15:17:56 -0000 Message-ID: <20020620151756.2766.qmail@icarus.apache.org> From: glyn@apache.org To: xml-axis-cvs@apache.org Subject: cvs commit: xml-axis/java/test/utils TestSrcContent.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N glyn 2002/06/20 08:17:56 Modified: java/docs developers-guide.html java/test/utils TestSrcContent.java Log: Describe how to add build-time source checks. Revision Changes Path 1.21 +24 -0 xml-axis/java/docs/developers-guide.html Index: developers-guide.html =================================================================== RCS file: /home/cvs/xml-axis/java/docs/developers-guide.html,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- developers-guide.html 13 Jun 2002 18:22:41 -0000 1.20 +++ developers-guide.html 20 Jun 2002 15:17:56 -0000 1.21 @@ -36,6 +36,7 @@
Compile and Run
Internationalization
Adding Testcases +
Adding Source Code Checks
Debugging
Running the JAX-RPC Compatibility Tests
  @@ -708,6 +709,29 @@ verify.  Check in your test.
  + +

+Adding Source Code Checks

+The Axis build performs certain automated checks of the files in the +source directory (java/src) to make sure certain conventions are +followed such as using internationalised strings when issuing messages. +

+If a convention can be reduced to a regular expression match, +it can be enforced at build time by updating +java/test/utils/TestSrcContent.java. +

+All that is necessary is to add a pattern to the static FileNameContentPattern +array. +Each pattern has three parameters: +

    +
  1. a pattern that matches filenames that are to be checked,
  2. +
  3. a pattern to be searched for in the chosen files, and
  4. +
  5. a boolean indicating whether the pattern is to be allowed +(typically false indicating not allowed).
  6. +
+

+A reasonable summary of the regular expression notation is provided in +the Jakarta ORO javadocs.

Debugging

1.8 +6 -2 xml-axis/java/test/utils/TestSrcContent.java Index: TestSrcContent.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/utils/TestSrcContent.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- TestSrcContent.java 19 Jun 2002 16:13:19 -0000 1.7 +++ TestSrcContent.java 20 Jun 2002 15:17:56 -0000 1.8 @@ -132,8 +132,12 @@ }; /** - * Check for the following in the input file: - * "org.apache.log4j" + * Patterns to be checked. Each pattern has three parameters: + * (i) a pattern that matches filenames that are to be checked, + * (ii) a pattern to be searched for in the chosen files + * (iii) whether the pattern is to be allowed (typically false indicating + * not allowed) + * See the Axis Developer's Guide for more information. */ private static final FileNameContentPattern avoidPatterns[] = {