suppression filter regex

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

suppression filter regex

Ben Dean-2

I’ve been trying to use a regular expression to suppress various checkstyle javadoc modules for all files *except* ones that are in an api package. I’ve tested the following regex with some online java regex testing applets and it seems to work there but I cannot get it to work when I run checkstyle the suppression filter looks like this:

 

      <suppress checks="JavadocType" files="^([^a]|a[^p]|ap[^i])*$" />

 

Does anyone know a way to suppress modules for every file except ones that match a given pattern (in other words, only apply to files that match the pattern). This is pretty much the opposite of what the suppression filter does normally.

 

-- Ben


Attention: This message and all attachments are private and may contain information that is confidential and privileged. If you receive this message in error, please notify the sender by reply email and delete the message immediately.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
Reply | Threaded
Open this post in threaded view
|

Re: suppression filter regex

Oliver Burn
try

    <suppress checks="JavadocType" files="[/\\]api[/\\]"/>

The "[/\\]" makes it work on both Windows and Unix.

On Tue, Dec 2, 2008 at 07:06, Ben Dean <[hidden email]> wrote:

I've been trying to use a regular expression to suppress various checkstyle javadoc modules for all files *except* ones that are in an api package. I've tested the following regex with some online java regex testing applets and it seems to work there but I cannot get it to work when I run checkstyle the suppression filter looks like this:

 

      <suppress checks="JavadocType" files="^([^a]|a[^p]|ap[^i])*$" />

 

Does anyone know a way to suppress modules for every file except ones that match a given pattern (in other words, only apply to files that match the pattern). This is pretty much the opposite of what the suppression filter does normally.

 

-- Ben


Attention: This message and all attachments are private and may contain information that is confidential and privileged. If you receive this message in error, please notify the sender by reply email and delete the message immediately.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
Reply | Threaded
Open this post in threaded view
|

Re: suppression filter regex

Ben Dean-2
In reply to this post by Ben Dean-2
That would work to have to suppress the JavadocType check for the api package. However I want to suppress the JavadocType check for everything that is not in the api package. The files that would match "[\\/]api[\\/]" are the only ones that I want the rule applied to.

-- Ben

On Tue, 2 Dec 2008 08:50:31 +1100, "Oliver Burn" <[hidden email]> wrote:

> try
>
>     <suppress checks="JavadocType" files="[/\\]api[/\\]"/>
>
> The "[/\\]" makes it work on both Windows and Unix.
>
> On Tue, Dec 2, 2008 at 07:06, Ben Dean <[hidden email]> wrote:
>
> >  I've been trying to use a regular expression to suppress various
> > checkstyle javadoc modules for all files **except** ones that are in an
> > api package. I've tested the following regex with some online java regex
> > testing applets and it seems to work there but I cannot get it to work when
> > I run checkstyle the suppression filter looks like this:
> >
> >       <suppress checks="JavadocType" files="^([^a]|a[^p]|ap[^i])*$" />
> >
> > Does anyone know a way to suppress modules for every file except ones that
> > match a given pattern (in other words, only apply to files that match the
> > pattern). This is pretty much the opposite of what the suppression filter
> > does normally.
> >
> > -- Ben
>

Attention: This message and all attachments are private and may contain
information that is confidential and privileged. If you received this
message in error, please notify the sender by reply email and delete
the message immediately.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
Reply | Threaded
Open this post in threaded view
|

Re: suppression filter regex

Oliver Burn
Ahhh...I think your only option is to add an explicit suppression for each directory other than the API ones.

On Wed, Dec 3, 2008 at 00:17, Ben Dean <[hidden email]> wrote:
That would work to have to suppress the JavadocType check for the api package. However I want to suppress the JavadocType check for everything that is not in the api package. The files that would match "[\\/]api[\\/]" are the only ones that I want the rule applied to.

-- Ben

On Tue, 2 Dec 2008 08:50:31 +1100, "Oliver Burn" <[hidden email]> wrote:
> try
>
>     <suppress checks="JavadocType" files="[/\\]api[/\\]"/>
>
> The "[/\\]" makes it work on both Windows and Unix.
>
> On Tue, Dec 2, 2008 at 07:06, Ben Dean <[hidden email]> wrote:
>
> >  I've been trying to use a regular expression to suppress various
> > checkstyle javadoc modules for all files **except** ones that are in an
> > api package. I've tested the following regex with some online java regex
> > testing applets and it seems to work there but I cannot get it to work when
> > I run checkstyle the suppression filter looks like this:
> >
> >       <suppress checks="JavadocType" files="^([^a]|a[^p]|ap[^i])*$" />
> >
> > Does anyone know a way to suppress modules for every file except ones that
> > match a given pattern (in other words, only apply to files that match the
> > pattern). This is pretty much the opposite of what the suppression filter
> > does normally.
> >
> > -- Ben
>

Attention: This message and all attachments are private and may contain
information that is confidential and privileged. If you received this
message in error, please notify the sender by reply email and delete
the message immediately.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user