-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
Add a filter for namespaces #385
Comments
It's more work to add this feature as you might expect:
|
Thanks for pointing out all area. I will give it a go. |
I have implemented this for the Whilst checking the other parsers, I noticed that all other parsers pass the full class name to the classfilter. E.g. Select(c => c.Parent.Attribute("Name").Value + "." + c.Attribute("Name").Value) So does the return c.Parent.Parent.Element("NamespaceName").Value + "." + fullname; The string className = fileName.Substring(fileName.LastIndexOf(Path.DirectorySeparatorChar) + 1); The Only the So how do you want me to go on from here?
I have pushed up my work so far as a draft pull request #387 |
I would suggest, that
|
I reviewed the code and the problem is, that the namespace is not considered in the filter. By changing I guess adding a separate |
Release 4.6.7 includes the fix. |
I only had suggested it based upon the one parser I was using and I didn't want to break that functionality, not realising that it was the only parser behaving that way. Maybe you can update the documentation to say that the class filter works on the full class name including namespace. You probably want to fix the broken parsers:
Use |
Works properly with my original filter: |
Describe the bug
Our assembly has internal .NUnit classes in the same assembly as the actual code.
To get proper code coverage reports I would like to exclude
*.NUnit.*
classes as they skew the metrics.I tried this with a
-classfilters:-*.NUnit.*
argument but this didn't work.Debugging the issue, I found that the class filter is called with
ClassName
and notFullName
I misinterpreted that class name does not include namespace.
I managed to sort of get what I needed by using
-classfilters:-*Fixture
, but that doesn't catch all test classes.To not break existing functionality, can we add an
-namespacefilters
argument?I don't mind contributing this functionality myself.
The text was updated successfully, but these errors were encountered: