Re: RegexpHeader not working with a regexp expression
"Srilakshmanan, Lakshman" <[email protected]>
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Emerson, I am no expert but I believe placing a "." (dot) in RegEx matches 'all'. The link below shows how to place a Copyright notice. http://checkstyle.sourceforge.net/config_header.html#RegexpHeader Thanks Lakshman > -----Original Message----- > From: [email protected] [mailto:checkstyle-user- > [email protected]] On Behalf Of emerson cargnin > Sent: Thursday, 26 April 2007 8:00 PM > To: [email protected] > Subject: Re: [Checkstyle-user] RegexpHeader not working with a regexp expression > > what should be the rule to add to make sure i have the word copyright > in the file???? I really tried everything, but nothing works :( > > On 20/04/07, emerson cargnin <[email protected]> wrote: > > I did, but still fails for a header like: > > > > /* > > * Copyrht (c) 2006 Company Ltd. All Rights Reserved. > > */ > > > > note the mispelling of Copyright > > > > My CS file has: > > <module name="RegexpHeader" > > > <property name="header" value="(?s)/\\*.*Copyright.*?\\*/"/> > > <property name="severity" value="error"/> > > </module> > > > > > > thanks for helping > > > > On 20/04/07, Oliver Burn <[email protected]> wrote: > > > Try double back quoting the regular expression. That is > > > (?s)/\\*.*Copyright.*?\\*/ > > > > > > On 4/17/07, emerson cargnin <[email protected]> wrote: > > > > > > > > I have this expression: > > > > > > > > (?s)/\*.*Copyright.*?\*/ > > > > > > > > This would ensure that any comment at the beginning of the file having > > > > the "Copyright" on it would match word > > > > > > > > this works inside eclipse find (using reg exp) but not when using > > > checkstyle 4.1 > > > > > > > > any clues? > > > > Emerson > > > > > > > > > > > ------------------------------------------------------------------------ - > > > > This SF.net email is sponsored by DB2 Express > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > control of your XML. No limits. Just data. Click to get it now. > > > > http://sourceforge.net/powerbar/db2/ > > > > _______________________________________________ > > > > Checkstyle-user mailing list > > > > [email protected] > > > > > > > https://lists.sourceforge.net/lists/listinfo/checkstyle-user > > > > > > > > > > > > > ------------------------------------------------------------------------ - > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > _______________________________________________ > > > Checkstyle-user mailing list > > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/checkstyle-user > > > > > > > > > > ------------------------------------------------------------------------ - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Checkstyle-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/checkstyle-user ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/