Menu

#1 Attribute-based rules

open-accepted
None
5
2010-06-20
2008-07-14
Dan Ports
No

The attached patch allows you to include or exclude classes from the coverage report based on attributes. Attribute rules are of the form attribute:<<type>> where <<type>> is the full name of the attribute class you want to match. For example, the following rule would exclude any classes with the CompilerGeneratedAttribute from the report:

PartCover.exe ... --exclude=attribute:System.Runtime.CompilerServices.CompilerGeneratedAttribute

Or, to include classes with the ControllerAttribute:

PartCover.exe ... --include=attribute:ControllerAttribute

Please excuse my rusty C++... :)

Discussion

  • Dan Ports

    Dan Ports - 2008-07-14

    Patch for r4

     
  • Shaun Wilde

    Shaun Wilde - 2010-06-20

    Useful idea - this patch is quite hold so not sure how well it would apply however I can see why you may need it especially for classes/methods for which you wish to ignore coverage (e.g. Mock objects etc)

    Thanks

     
  • Shaun Wilde

    Shaun Wilde - 2010-06-20
    • assigned_to: nobody --> sawilde
    • status: open --> open-accepted
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.