danielpalme / ReportGenerator

ReportGenerator converts coverage reports generated by coverlet, OpenCover, dotCover, Visual Studio, NCover, Cobertura, JaCoCo, Clover, gcov or lcov into human readable reports in various formats.
https://reportgenerator.io
Apache License 2.0
2.65k stars 283 forks source link

Ability to exclude classes from Risk Hotspots #664

Closed ricardoboss closed 6 months ago

ricardoboss commented 7 months ago

Hi there!

I'd like to exclude certain classes/files from Risk Hotspots. Is this possible without disabling the whole Risk Hotspot section?

danielpalme commented 7 months ago

@ricardoboss Filters for the Risk Hotspots via command line arguments are currently not supported.

But you can limit the number of results by selecting an assembly or by entering a search term: image

ricardoboss commented 7 months ago

Hi! Thanks for taking the time to respond.

We are using Report Generator as part of our Azure Pipeline and generate a HTML inline report for Azure. Can we pass any arguments to the ADO task to exclude them before generating the report?

danielpalme commented 7 months ago

No there is currently no option. The problem with the report within Azure DevOps is, that all JavaScript is blocked and you can't filter dynamically. You can download the report from the build artifacts and browse it locally (with dynamic filtering).

ricardoboss commented 7 months ago

Not sure dynamic filtering is what I need. Ideally there'd be a way to permanently exclude certain files/classes from risk hotspots.

danielpalme commented 7 months ago

Maybe in a next release.

danielpalme commented 6 months ago

The latest release 5.3.4 offers two new command line parameters:

Those two settings let you filter the risk hotspots. See also: https://reportgenerator.io/usage