From: Steven C. <ste...@re...> - 2010-12-10 00:31:52
|
It is not possible to have something like the following (at least to the best of my understanding): public void someMethod() { ... //Cobertura ignore start ... ... //Cobertura ignore end ... } There are 2 suggested methods below: In your ant script you can add the following: | <ignore regex="org.apache.log4j.*" /> | |In this example you will ignore everything that's located in org.apache.log4j.* .| |Another method is to not instrument the specific file by adding an exclude for the certain file:| |<exclude name="**/NAME_OF_FILE.java"/> | On 12/9/2010 5:50 PM, Shi.Zhao wrote: > Hi, > > I own a very huge java project with lots of java classes. some code is really useful but very hard or impossible to test. > Is there any work around to ignore those lines? For example, Specifying /* Not feasible */ in java souce, then Cobertura ignore it. > > Thanks in advance! > > Thanks, > -Shi > > ------------------------------------------------------------------------------ > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel Email Disclaimer: http://www.redprairie.com/emaildisclaimer/ |