Skip to content

Commit fb3d273

Browse files
committed
chore(model): Illustrate defining multiple license fact providers
When multiple providers of the same type are defined, then an `id` has to be specified explicitly. Illustrate this in `reference.yml`. Signed-off-by: Frank Viernau <frank.viernau@gmail.com>
1 parent dbc0268 commit fb3d273

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

model/src/main/resources/reference.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,13 @@ ort:
3838
licenseFactProviders:
3939
- type: "DefaultDir"
4040
- type: "Dir"
41+
id: "local-custom-license-texts"
4142
options:
42-
licenseTextDir: '/path/to/license/text/dir'
43+
licenseTextDir: '/project-sources/.ort/custom-license-texts'
44+
- type: "Dir"
45+
id: "global-custom-license-texts"
46+
options:
47+
licenseTextDir: '/ort-config/custom-license-texts'
4348
- type: "SPDX"
4449
- type: "ScanCode"
4550
options:

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@ class OrtConfigurationTest : WordSpec({
6363
ProviderPluginConfiguration(type = "DefaultDir"),
6464
ProviderPluginConfiguration(
6565
type = "Dir",
66-
options = mapOf("licenseTextDir" to "/path/to/license/text/dir")
66+
id = "local-custom-license-texts",
67+
options = mapOf("licenseTextDir" to "/project-sources/.ort/custom-license-texts")
68+
),
69+
ProviderPluginConfiguration(
70+
type = "Dir",
71+
id = "global-custom-license-texts",
72+
options = mapOf("licenseTextDir" to "/ort-config/custom-license-texts")
6773
),
6874
ProviderPluginConfiguration(type = "SPDX"),
6975
ProviderPluginConfiguration(

0 commit comments

Comments
 (0)