-
Notifications
You must be signed in to change notification settings - Fork 389
Add [xunit*]*
to default excluded modules filter if not specified
#462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,6 +57,12 @@ static int Main(string[] args) | |
logger.Level = verbosity.ParsedValue; | ||
} | ||
|
||
// We add default exclusion filter if no specified | ||
if (excludeFilters.Values.Count == 0) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just curious, why did we chose to include if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comment says "We add default exclusion filter if no specified" but you are not adding the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The idea is to remove only in default config...after first include users win. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When are you adding the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Today we've 3 entry point/driver for coverlet console/msbuild/collector they behave in a different way on defaults. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. check manual tests FYI |
||
{ | ||
excludeFilters.Values.Add("[xunit*]*"); | ||
} | ||
|
||
Coverage coverage = new Coverage(module.Value, | ||
includeFilters.Values.ToArray(), | ||
includeDirectories.Values.ToArray(), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't make that assumption, but more like
excludeFilters.Contains(CoverletConstants.DefaultExcludeFilter) && excludeFilters.Count==1
is way safer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CoverletConstants.DefaultExcludeFilter
will be always present