Skip to content

Commit 40fa386

Browse files
committedFeb 13, 2025·
feat(scanner)!: Migrate to new plugin API
Migrate the `ScannerWrapper` plugins to the new plugin API. One major difference is that the configuration properties for the scan result matcher are not automatically supported for all plugins anymore. Instead, plugins have to decide which of them they want to make configurable. The previous mechanism was difficult to translate to the new plugin API and also not all plugins need to support all of those options. The plugin API requires list options to be comma-separated, therefore the ScanCode command line options now have to be provided comma-separated instead of separated by whitespace. Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.com>
1 parent f71062c commit 40fa386

File tree

48 files changed

+626
-777
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+626
-777
lines changed
 

‎model/src/main/resources/reference.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,10 @@ ort:
237237
options:
238238
# Command line options that affect the ScanCode output. If changed, stored scan results that were created with
239239
# different options are not reused.
240-
commandLine: '--copyright --license --info --strip-root --timeout 300'
240+
commandLine: '--copyright,--license,--info,--strip-root,--timeout,300'
241241

242242
# Command line options that do not affect the ScanCode output.
243-
commandLineNonConfig: '--processes 4'
243+
commandLineNonConfig: '--processes,4'
244244

245245
# Use per-file license findings instead of per-line ones.
246246
preferFileLicense: false

‎model/src/test/kotlin/config/OrtConfigurationTest.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ class OrtConfigurationTest : WordSpec({
241241
config shouldNotBeNull {
242242
get("ScanCode") shouldNotBeNull {
243243
options shouldContainExactly mapOf(
244-
"commandLine" to "--copyright --license --info --strip-root --timeout 300",
245-
"commandLineNonConfig" to "--processes 4",
244+
"commandLine" to "--copyright,--license,--info,--strip-root,--timeout,300",
245+
"commandLineNonConfig" to "--processes,4",
246246
"preferFileLicense" to "false",
247247
"minVersion" to "3.2.1-rc2",
248248
"maxVersion" to "32.0.0"

0 commit comments

Comments
 (0)