Skip to content

Settings

Daniel Palme edited this page Aug 12, 2023 · 22 revisions

ReportGenerator has some options which allow to control its behavior. These settings can be changed in appsettings.json or via command line parameters.

Allowed formats (see documentation):

section:key=value
/section:key=value
--section:key=value

Risk Hotspots

Command line parameter Explanation
riskHotspotsAnalysisThresholds:metricThresholdForCyclomaticComplexity=30 Threshold for cyclomatic complexity metric.
riskHotspotsAnalysisThresholds:metricThresholdForCrapScore=15 Threshold for crap score metric
riskHotspotsAnalysisThresholds:metricThresholdForNPathComplexity=200 Threshold for NPath complexity metric

Minimum coverage thresholds

Command line parameter Explanation
minimumCoverageThresholds:lineCoverage=null Threshold for minimum line coverage. If line coverage falls below this threshold, ReportGenerator will exit unsuccessfully. Value has to be a number (percentage) between 1 and 100.
minimumCoverageThresholds:branchCoverage=null Threshold for minimum branch coverage. If branch coverage falls below this threshold, ReportGenerator will exit unsuccessfully. Value has to be a number (percentage) between 1 and 100.
minimumCoverageThresholds:methodCoverage=null Threshold for minimum method coverage. If method coverage falls below this threshold, ReportGenerator will exit unsuccessfully. Value has to be a number (percentage) between 1 and 100.

Other settings

Command line parameter Explanation
settings:numberOfReportsParsedInParallel=1 The number of XML reports / coverage files that are processed in parallel.
Higher values will result in faster execution times but memory usage will grow too.
settings:numberOfReportsMergedInParallel=1 The number of XML reports / coverage files that are merged in parallel after parsing them.
Higher values will result in faster execution times but memory usage will grow too.
settings:maximumNumberOfHistoricCoverageFiles=100 Maximum number of historic coverage files that get parsed.
settings:renderPngFallBackImagesForHistoryCharts=false Indicates whether PNG images are rendered as a fallback for history charts. Those images get displayed if JavaScript is disabled. Rendering of the images takes quite a lot of time.
You should only enable this, if you work in an environment where JavaScript is disabled (e.g. Azure DevOps, Jenkins).
For report types HTMLSummaryand HTMLInline the PNG images are always generated.
settings:cachingDurationOfRemoteFilesInMinutes=10080 The caching duration of code files that are downloaded from remote servers in minutes.
settings:disableRiskHotspots=false Indicates whether risk hotspots should be disabled or not.
settings:excludeTestProjects=false Indicates whether test projects should be included or not (only for Clover files).
settings:createSubdirectoryForAllReportTypes=false Indicates whether a subdirectory should be created in the target directory for each report type.
settings:customHeadersForRemoteFiles=null Custom headers (e.g. authentication headers) for remote requests
Format: key1=value1;key2=value2
Example: "settings:customHeadersForRemoteFiles=Authorization=Bearer <JWT>"
settings:defaultAssemblyName=Default The default assembly name for gcov and lcov.
settings:maximumDecimalPlacesForCoverageQuotas=1 The maximum number of decimal places for coverage quotas / percentages.
Clone this wiki locally