danielpalme/ReportGenerator

Ability to exclude classes from Risk Hotspots

ricardoboss opened this issue · 6 comments

Hi there!

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

@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

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?

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).

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

Maybe in a next release.

The latest release 5.3.4 offers two new command line parameters:

  • -riskhotspotassemblyfilters:
  • -riskhotspotclassfilters:

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