Skip to content

Commit 301d146

Browse files
committed
feat(rules): Illustrate how to run a rule for all license sources once
Signed-off-by: Frank Viernau <frank.viernau@gmail.com>
1 parent 2d0f991 commit 301d146

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

evaluator.rules.kts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,16 +1173,15 @@ fun RuleSet.copyleftInDependencyRule() = packageRule("COPYLEFT_IN_DEPENDENCY") {
11731173
-isExcluded()
11741174
}
11751175

1176-
licenseRule("COPYLEFT_IN_DEPENDENCY", LicenseView.CONCLUDED_OR_DECLARED_AND_DETECTED) {
1176+
licenseRule("COPYLEFT_IN_DEPENDENCY", LicenseView.CONCLUDED_OR_DECLARED_AND_DETECTED, false) {
11771177
require {
11781178
+isCopyleft()
11791179
-isExcluded()
11801180
}
11811181

11821182
error(
11831183
"The dependency '${pkg.metadata.id.toCoordinates()}' is licensed under the ScanCode 'copyleft' " +
1184-
"categorized license $license.",
1185-
howToFixLicenseViolationDefault(license.toString(), licenseSources.single())
1184+
"categorized license $license.",""
11861185
)
11871186
}
11881187
}

0 commit comments

Comments
 (0)