@@ -43,7 +43,6 @@ import org.apache.logging.log4j.kotlin.logger
4343
4444import org.ossreviewtoolkit.model.config.CopyrightGarbage
4545import org.ossreviewtoolkit.model.config.LicenseFilePatterns
46- import org.ossreviewtoolkit.model.config.PluginConfiguration
4746import org.ossreviewtoolkit.model.config.RepositoryConfiguration
4847import org.ossreviewtoolkit.model.config.createFileArchiver
4948import org.ossreviewtoolkit.model.config.orEmpty
@@ -57,6 +56,7 @@ import org.ossreviewtoolkit.model.utils.DefaultResolutionProvider
5756import org.ossreviewtoolkit.plugins.api.OrtPlugin
5857import org.ossreviewtoolkit.plugins.api.PluginConfig
5958import org.ossreviewtoolkit.plugins.api.PluginDescriptor
59+ import org.ossreviewtoolkit.plugins.api.orEmpty
6060import org.ossreviewtoolkit.plugins.commands.api.OrtCommand
6161import org.ossreviewtoolkit.plugins.commands.api.OrtCommandFactory
6262import org.ossreviewtoolkit.plugins.commands.api.utils.configurationGroup
@@ -277,7 +277,7 @@ class ReporterCommand(descriptor: PluginDescriptor = ReporterCommandFactory.desc
277277 howToFixTextProvider
278278 )
279279
280- val reportConfigMap = sortedMapOf<String , PluginConfiguration >(String .CASE_INSENSITIVE_ORDER )
280+ val reportConfigMap = sortedMapOf<String , PluginConfig >(String .CASE_INSENSITIVE_ORDER )
281281
282282 // Obtain reporter-specific options defined in ORT's configuration.
283283 ortConfig.reporter.config?.forEach { (reporterName, config) ->
@@ -286,7 +286,7 @@ class ReporterCommand(descriptor: PluginDescriptor = ReporterCommandFactory.desc
286286
287287 // Allow overwriting reporter-specific options via the command line.
288288 reportOptions.forEach { (reporterName, option) ->
289- val reportSpecificConfig = reportConfigMap.getOrPut(reporterName) { PluginConfiguration .EMPTY }
289+ val reportSpecificConfig = reportConfigMap.getOrPut(reporterName) { PluginConfig .EMPTY }
290290 val updatedConfig = reportSpecificConfig.copy(options = reportSpecificConfig.options + option)
291291 reportConfigMap[reporterName] = updatedConfig
292292 }
@@ -300,9 +300,8 @@ class ReporterCommand(descriptor: PluginDescriptor = ReporterCommandFactory.desc
300300 echo(" Generating '${reporter.descriptor.id} ' report(s) in thread '$threadName '..." )
301301
302302 reporter to measureTimedValue {
303- val options = reportConfigMap[reporter.descriptor.id] ? : PluginConfiguration .EMPTY
304- reporter.create(PluginConfig (options.options, options.secrets))
305- .generateReport(input, outputDir)
303+ val pluginConfig = reportConfigMap[reporter.descriptor.id].orEmpty()
304+ reporter.create(pluginConfig).generateReport(input, outputDir)
306305 }
307306 }
308307 }.awaitAll()
0 commit comments