From: SourceForge.net <no...@so...> - 2010-11-16 02:34:27
|
Feature Requests item #3098010, was opened at 2010-10-29 15:32 Message generated for change (Comment added) made by dongsj You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=720018&aid=3098010&group_id=130558 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Luke Lindsay (lindsal) Assigned to: Nobody/Anonymous (nobody) Summary: A way to ignore certain methods/lines in report Initial Comment: I have been using cobertura for around a month, so am a relative newbie. A feature I would find very useful is a way to distinguish between (a) untested code that I know about and have decided not to test and (b) untested code that I plan to write tests for. Is there way to do this other than at the class level? If not, I thought a simple way to implement this might be to have a plain text file listing things to ignore. The syntax could something like the following: package.ClassName //ignore whole class package.ClassName.main //ignore main method **.set* //ignore all setter methods in all classes file:package/ClassName.java:20,50,56 //ignore lines 20, 50, 56 in file file:package/ClassName.java:"a = b || c;" //ignore line(s) matching the expression in quotes in file file:**/*.java:assert** //ignore assertions in all files Then in the coverage report, there could be two extra categories: covered ignored and uncovered ignored (which perhaps could be shaded grey). Best, Luke ---------------------------------------------------------------------- Comment By: songjie dong (dongsj) Date: 2010-11-16 10:34 Message: maybe we could have another mode for instrument because tree pattern would be better for complex ignore rule, what about you guys? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=720018&aid=3098010&group_id=130558 |