Skip to content

Commit f9bab98

Browse files
committed
chore(spdx-reporter): Inline DEFAULT_CONFIG
This removes unused values such as `spdxVersion` which is always overwritten by the only use of the instance via `copy()`. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
1 parent ea099ab commit f9bab98

1 file changed

Lines changed: 8 additions & 14 deletions

File tree

plugins/reporters/spdx/src/funTest/kotlin/SpdxDocumentReporterFunTest.kt

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,6 @@ class SpdxDocumentReporterFunTest : WordSpec({
126126
}
127127
})
128128

129-
private val DEFAULT_CONFIG = SpdxDocumentReporterConfig(
130-
spdxVersion = SPDX_VERSION_2_2,
131-
creationInfoComment = "some creation info comment",
132-
creationInfoPerson = "some creation info person",
133-
creationInfoOrganization = "some creation info organization",
134-
documentComment = "some document comment",
135-
documentName = "some document name",
136-
fileInformationEnabled = true,
137-
outputFileFormats = emptyList()
138-
)
139-
140129
private fun TestConfiguration.generateReport(
141130
ortResult: OrtResult,
142131
format: FileFormat,
@@ -147,10 +136,15 @@ private fun TestConfiguration.generateReport(
147136

148137
val outputDir = tempdir()
149138

150-
val config = DEFAULT_CONFIG.copy(
139+
val config = SpdxDocumentReporterConfig(
140+
spdxVersion = spdxVersion,
141+
creationInfoComment = "some creation info comment",
142+
creationInfoPerson = "some creation info person",
143+
creationInfoOrganization = "some creation info organization",
144+
documentComment = "some document comment",
145+
documentName = "some document name",
151146
fileInformationEnabled = fileInformationEnabled,
152-
outputFileFormats = listOf(format.name),
153-
spdxVersion = spdxVersion
147+
outputFileFormats = listOf(format.name)
154148
)
155149

156150
return SpdxDocumentReporter(config = config)

0 commit comments

Comments
 (0)