Skip to content

Commit

Permalink
style(EvaluatedModelMapper): Make calling getStatistics() a one-liner
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau committed Feb 28, 2023
1 parent 2b9db43 commit dfde047
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import org.ossreviewtoolkit.model.utils.FindingsMatcher
import org.ossreviewtoolkit.model.utils.RootLicenseMatcher
import org.ossreviewtoolkit.model.yamlMapper
import org.ossreviewtoolkit.reporter.ReporterInput
import org.ossreviewtoolkit.reporter.reporters.evaluatedmodel.StatisticsCalculator.getStatistics
import org.ossreviewtoolkit.utils.ort.ProcessedDeclaredLicense

/**
Expand Down Expand Up @@ -137,11 +138,7 @@ internal class EvaluatedModelMapper(private val input: ReporterInput) {
ruleViolations = ruleViolations,
vulnerabilitiesResolutions = vulnerabilitiesResolutions,
vulnerabilities = vulnerabilities,
statistics = StatisticsCalculator.getStatistics(
input.ortResult,
input.resolutionProvider,
input.licenseInfoResolver
),
statistics = with(input) { getStatistics(ortResult, resolutionProvider, licenseInfoResolver) },
repository = input.ortResult.repository,
severeIssueThreshold = input.ortConfig.severeIssueThreshold,
severeRuleViolationThreshold = input.ortConfig.severeRuleViolationThreshold,
Expand Down

0 comments on commit dfde047

Please sign in to comment.