-
Notifications
You must be signed in to change notification settings - Fork 392
Closed
Labels
enhancementGeneral enhancement requestGeneral enhancement request
Description
As of now, coverlet could exclude any classes/methods/properties decorated with ExcludeFromCodeCoverage attribute. However, it does not applicable for code annotated by other attributes like GeneratedCodeAttribute nor CompilerGeneratedAttribute. In short, it does not allow user to exclude with arbitrary attribute. This is one of most common feature for other coverage tool (e.g. dotcover) that I usually use.
There are already demands to this feature, as listed below:
- Compiler generated classes shown in the coverage result file #194 - CompilerGeneratedAttribute
- GeneratedCodeAttribute #125 - GeneratedCodeAttribute
The feature will have the following criteria:
- Add additional argument parameter
--exclude-by-attributefor CLI tool - Add additional MSBUILD property
ExcludeByAttribute - Existing implementation to exclude code annotated by
ExcludeByCodeCoverageremains as is - Exclusion list could be arbitrary specified in multiple, delimited by
,, just like existingExcludelist. - Any code, i.e.: classes, properties, and methods annotated with listed attributes, will be ignored from coverage.
- The behavior of criteria 5 above, will be similar to how existing
ExcludeByCodeCoverageworks.
TQ.
amweiss and safakgur
Metadata
Metadata
Assignees
Labels
enhancementGeneral enhancement requestGeneral enhancement request