custom messages

burton <[email protected]> Fri, 10 Sep 2010 16:31:36 -0400
Newsgroups gmane.comp.java.audit.checkstyle.user
Organization Computer Science and Engineering York University
Message-ID <[email protected]>
Hi, I'm trying to create a custom message for a check. The docs give an 
example:

http://checkstyle.sourceforge.net/config.html#Custom%20messages

<module name="MemberName">
     <property name="format" value="^m[a-zA-Z0-9]*$"/>
     <message key="name.invalidPattern"
              value="Member ''{0}'' must start with a lowercase ''m'' 
(checked pattern ''{1}'')."
              />
</module>

	

When I incorporate this example verbatim into a configuration file, 
Checkstyle claims that there is an error in the configuration file:

java -jar checkstyle-all-5.1.jar -c ./test_checks.xml Test.java
Error loading configuration file
com.puppycrawl.tools.checkstyle.api.CheckstyleException: unable to read 
./test_checks.xml - unable to parse configuration stream - Element type 
"message" must be declared.:12:15

... followed by more error output.

Anyone know what (if anything) is wrong with the example?

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev