Suppress is not ignoring the files

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Suppress is not ignoring the files

kavitha

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
Reply | Threaded
Open this post in threaded view
|

Re: Suppress is not ignoring the files

Oliver Burn
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 <[hidden email]> 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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
Reply | Threaded
Open this post in threaded view
|

Re: Suppress is not ignoring the files

kavitha

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:[hidden email]]
Sent: Wednesday, January 12, 2011 9:55 AM
To: [hidden email]
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 <[hidden email]> 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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user