Re: Suppress is not ignoring the files
"Kavitha S" <[email protected]> Wed, 12 Jan 2011 10:27:25 +0530
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Organization | Dhyan Infotech |
| Message-ID | <[email protected]> |
Hi Oliver,
Thanks for the response.
We were eagerly waiting for the response from yesterday onwards as we are in
urgency to implement the suppression tags. (Lot of customer files is throws
error for checkstyle)
Yes, I want to match the file name "Constants.java".
Tried with "[/\\]Constants.java$", but not working.
Below are the steps which I followed:
1. SVN checkout in windows
2. Modified "Constants.java" file
3. Committed the file through right click "SVN commit."
4. Error appears as "Commit failed (details follow): ..
Now the Supperssions.xml file, in between suppressions tag, appears as:
<suppress checks="." files="[/\\]SoapAdapter.java$"/>
Thank you,
Kavitha
_____
From: Oliver Burn [mailto:[email protected]]
Sent: Wednesday, January 12, 2011 9:55 AM
To: [email protected]
Subject: Re: [Checkstyle-user] Suppress is not ignoring the files
Hi,
Remember that the expression "[/\\]Constants[/\\]java[/\\]" is interpreted
as a regular expression.
Give this, your expression will match the following:
* /Constants/java/
* \Constants\java\
I doubt this is what you want. If you are wanting to match the file
Constants.java, when use the expression "[/\\]Constants.java$".
Regards,
Oliver
On Tue, Jan 11, 2011 at 19:54, Kavitha S <[email protected]> wrote:
Hi,
SuppressionFilter is not ignoring the files which are given in
suppressions.xml.
Configured Checkstyle version is 4.4
In checkstyle.xml,
<module name="Checker">
<module name="SuppressionFilter">
<property name="file"
value="/home/svn/testrepo1/scripts/suppressions.xml"/>
</module>
<module name="TreeWalker">
<module name="ConstantName"/>
..
</module>
</module>
In suppressions.xml (which is in /home/svn/testrepo1/scripts),
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.0//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
<suppressions>
<suppress checks="."
files="[/\\]Constants[/\\]java[/\\]"/>
</suppressions>
Please help me on how to configure suppressions.xml
Regards,
Kavitha
----------------------------------------------------------------------------
--
Gaining the trust of online customers is vital for the success of any
company
that requires sensitive data to be transmitted over the Web. Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Checkstyle-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Checkstyle-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user