From: Carlos S. <ca...@ap...> - 2005-10-06 21:15:57
|
Thanks, that worked. It will be supported in the next version of the maven cobertura plugin. http://maven-plugins.sourceforge.net/maven-cobertura-plugin/index.html On 9/28/05, Mark Doliner <Mar...@sa...> wrote: > The regex is only applied to the names of classes that are called. So yo= u could ignore calls to all methods in the log class by using the regular e= xpression > > org.apache.log4j.* > > It's definitely very limited, as currently implemented. > -Mark > > > -----Original Message----- > > From: car...@gm... [mailto:car...@gm...] On > > Behalf Of Carlos Sanchez > > Sent: Tuesday, September 27, 2005 4:52 PM > > To: Mark Doliner > > Cc: cob...@li... > > Subject: Re: [Cobertura-devel] Excluding statements from > > coverage stats > > > > Thanks, I haven't noticed that, but seems it doesn't work with > > multiline regexps: > > > > if (log.isDebugEnabled()) { > > log.debug(""); > > } > > > > I've tried with this regex without luck: > > if[\n\t\s\r]*\([\n\t\s\r]*log\..*[\n\t\s\r]*\)[\n\t\s\r]*\{ > > > > If I'm right this could be a good enhancement to the check task. > > > > Regards. > > > > On 9/26/05, Mark Doliner <Mar...@sa...> wrote: > > > It is possible to filter out calls to certain classes using > > an ignore filter when instrumeting. See > > http://cobertura.sourceforge.net/anttaskreference.html and > > the build.xml file included in the basic example that comes > > with Cobertura. > > > > > > I don't use this myself, so it may only have limited > > usefulness. Please let us know if you think it can be > > improved somehow. > > > > > > -Mark > > > > > > > -----Original Message----- > > > > From: cob...@li... > > > > [mailto:cob...@li...] On > > > > Behalf Of Carlos Sanchez > > > > Sent: Monday, September 26, 2005 5:00 PM > > > > To: cob...@li... > > > > Subject: [Cobertura-devel] Excluding statements from > > coverage stats > > > > > > > > Hi, > > > > > > > > Is it possible to exclude statements from stats as clover does? > > > > eg. I don't want this line to be counted: > > > > > > > > if (log.isDebugEnabled()) { > > > > log.debug(""); > > > > } > > > > > > > > Clover does this through Statement Contexts: > > > > http://www.cenqua.com/clover/doc/adv/contexts.html > > > > > > > > Thanks > > > > > > > > Carlos Sanchez > > > > > > > > > > > > ------------------------------------------------------- > > > > SF.Net email is sponsored by: > > > > Tame your development challenges with Apache's Geronimo App > > > > Server. Download > > > > it for free - -and be entered to win a 42" plasma tv or > > your very own > > > > Sony(tm)PSP. Click here to play: > > http://sourceforge.net/geronimo.php > > > > _______________________________________________ > > > > Cobertura-devel mailing list > > > > Cob...@li... > > > > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > > > > > > > > > |