Skip to content
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

Allow assemblyfilters/filefilters to be case insensitive #392

Closed
nikosatwork opened this issue Oct 8, 2020 · 4 comments
Closed

Allow assemblyfilters/filefilters to be case insensitive #392

nikosatwork opened this issue Oct 8, 2020 · 4 comments

Comments

@nikosatwork
Copy link

Describe the bug

It appears that DefaultFilter's excludeFilters/includeFilters are case sensitive. It would be great if there was an option to disable that and allow any case to be matched in the regex

To Reproduce

when there is an assembly named Some.Assembly in your code, if you pass
-assemblyfilters:+Some.* then Some.Assembly will be included in the report
however, if you pass -assemblyfilters:+some.*, Some.Assembly will not be included in the report

@danielpalme
Copy link
Owner

Instead of changing the implementation, you could also:

  • Use several filters: -assemblyfilters:+Some.*;-assemblyfilters:+some.*
  • Use wildcards: -assemblyfilters:+*ome.*
  • Use a consistent naming scheme for all your assemblies :-)

@manfred-brands
Copy link
Contributor

I agree with @nikosatwork. I have a script that runs coverage and reporting for a specified assembly by name as found on disk (e.g. Some.Assembly).
Either the coverage runner (dotnet) or converter (CodeCoverage.exe) converts the assembly name to lower case in the xml file. I don't know if other runners do the same or not.
Therefore when passing that same 'Some.Assembly' to the ReportGenerator results in an empty report.

I worked around this by explicitly converting the argument to lowercase before passing to ReportGenerator.
It would be nice if ReportGenerator would either convert the filter to lower case if all collectors do that or use case-insensitive comparison.

If you agree, I can modify the code and raise a PR.

@danielpalme
Copy link
Owner

Fixed in release 4.7.1

@nikosatwork
Copy link
Author

Thank you @danielpalme!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants