Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Publish code coverage task overrides ReportGenerator filters #10354
I am configuring azure CI pipeline. And I've added following steps:
ReportGenerator is the well know tool https://github.com/danielpalme/ReportGenerator
in the ReportGenerator I apply filters to exclude test projects from the total test coverage report and exclude extra xUnit assemblies from analysis.
In the console log I see that following filters were applied:
-assemblyfilters:-[.tests] -[.Tests] -[xunit.]* -[.Test] -[Xunit.]*
as you also can see, on the next step Publishing code coverage task starts and it re-generates summary report one more time without applying the assembly filtering.
how to apply filtering and exclude necessary files from the report on CI, while publishing code coverage step override the filter attributes. Can you also apply settings for filtering classes and assemblies
Disclaimer: I'm the maintainer/author of ReportGenerator
I think the new behavior is not what users are expecting.
As I have struggled with this being new to Pipelines, I want to expand on @danielpalme 's suggestion. I tried passing it every which way as a parameter, but it needed to be set at the start of my Yaml file in the following block.
I have it just before the steps, and am listing that for someone else who might need a nudge in the right direction.
The auto-generated reports don't seem to respect the current theme set in the DevOps GUI. Is this intended? There doesn't seem to be a way to configure the theme used by the auto-generated report, so is the only way to disable autogeneration using above methods, and keep generating it manually?
I looked at my code to see how I solved it, and I set the variable in each caller. A quick search found this article though that might help. Look at the section titled "Variable re-use" and see if it might work for you. :)