-
-
Notifications
You must be signed in to change notification settings - Fork 283
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
Inconsistent results with file filters #704
Labels
Comments
Thanks for the detailed report! I will have a look as soon as possible. |
danielpalme
added a commit
that referenced
this issue
Nov 9, 2024
danielpalme
added a commit
that referenced
this issue
Nov 9, 2024
I have fixed both issues:
A new release will be published next week after .NET 9 has been released. |
Awesome, thanks for the quick response - I will try it out once your new version is live |
Release 5.4.0 is now available! |
Tested and working, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Goal: To filter out everything in the
Base/Foo
folder and sub folders and report in multiple formatsI have found a few problems trying to do this:
\
path separators even if the source files contain/
separators.\
separatorsTo Reproduce
The sample-coverage.xml.txt file uses the
/
path separator so that seems like a natrual choice in the-filefilters
parameter but that does not work at all with this command line:Nothing at all is filtered out in any report.
Switching to
\
(which is not intuitively what I should need to do) and calling:then I get variable results as follows:
SonarQuble.xml
looks correct:ie no
Base/Foo
references at all.SummaryGithub.md
is not quite right:It still lists
Base.Foo
but does not include any coverage information, but it should not show anything at allHtml_Dark
seems to be correctly excludingBase.Foo
completelyExpected Outcome
Ideally I should be able to specify file (or other file-like) filters using either
\
or/
as I prefer, but as a minimum, the separators used in the source coverage files should be respected - if they use/
then/
should be allowed. I feel this latter might be a bit confusing though as, depending on the source file, (which could depend on the OS it was run on), the path separator might have to change. It would be easier from the user's perspective to use whichever path separator they are more comfortable with.For all report types, if I have excluded particular files, they should not be reported anywhere - and indeed if excluding all of the files in a folder, or all of the tests in a file, results in nothing being covered then there should be no reference to that at all in the output - ie my exclusions have removed everything under
Base/Foo
so I should not see any reference at all toBase.Foo
in any output. This is distinct from the files inBase/Foo
having no coverage.The text was updated successfully, but these errors were encountered: