Welcome Guest! To enable all features please Login or Register.



Can I exclude certain files from the NCrunch Metrics based on filename pattern?
#1 Posted : Monday, October 15, 2018 5:24:39 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/15/2018(UTC)
Posts: 1
Location: Denmark


I have a lot of .xaml.cs files in my project that are hard/impossible to write good unit tests for and I would like to remove them from the Coverage Metric.

Of course I could go through the list of all files and remove them from metric aggregation, but that would be a lot of work.

Is it possible to get NCrunch to ignore all *.xaml.cs files?

#2 Posted : Monday, October 15, 2018 9:20:02 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,640

Thanks: 734 times
Was thanked: 934 time(s) in 890 post(s)
Hi Peter,

Thanks for posting!

There's no feature in NCrunch that lets you exclude coverage from files based on a wildcard. You're welcome to request one on uservoice if you like. Right now the exclusions are only handled through the toolbar options on the Metrics Window.

The only other option I can think of would be disable instrumentation for your .xaml.cs files using code coverage suppression comments, though in your situation I don't think this would be a very attractive approach.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.023 seconds.