Re: RegexpHeader not working with a regexp expression
"Piotr Jaworowski" <[email protected]>
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <[email protected]> |
Hi All,
I've decided to write an email about the RegexpHeader issue, I hope this
will help some other folks like me.
I had very similar problem to emerson, I was suppose to find a Copyright in
the header, but the statement could be anywhere inside the header. I don't
think it's possible to use RegexpHeader to solve it, but there is nice
Regexp stuff in Miscelanouse section which you can use. All is nice describe
here: http://checkstyle.sourceforge.net/config_misc.html#Regexp, I've used
it and it works.
It might have a side effect as it's searching whole file not only the
header, so be carefull using it.
Mine configuration is looking like this and it works:
<module name="Regexp">
<property name="format" value="(?s)^.*Copyright.*$"/>
</module>
Hope it helps.
Cheers,
Piotr
>From: emerson cargnin <echofloripa.yell@gm...> - 2007-04-27 10:40
> Yes i've seem that, but it uses a different kind of comment.
>
> I managed to have it working checking the word copyright in the file.
> Although i wanted to make sure that was in the first comment in the
> file, this works.
>
> <module name="RegexpHeader">
> <property name="header" value="^.*$\n.*Copyright.*"/>
> </module>
>
> thanks for the help
> Emerson
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Checkstyle-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user