Skip to content

Commit

Permalink
fix(spdx-utils): Accept the "no patent" exception
Browse files Browse the repository at this point in the history
See e.g. [1], which is marked as an exception.

[1]: https://scancode-licensedb.aboutcode.org/?search=LicenseRef-scancode-ecma-no-patent

Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
  • Loading branch information
sschuberth committed Oct 16, 2024
1 parent 8c103c4 commit 9d0873c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utils/spdx/src/main/kotlin/SpdxExpression.kt
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,10 @@ class SpdxLicenseWithExceptionExpression(
val exception: String
) : SpdxSingleLicenseExpression() {
companion object {
private val EXCEPTION_STRING_PATTERN = Regex("\\b(exception|additional-terms)\\b", RegexOption.IGNORE_CASE)
private val EXCEPTION_STRING_PATTERN = Regex(
"\\b(exception|additional-terms|no-patent)\\b",
RegexOption.IGNORE_CASE
)

/**
* Parse a string into an [SpdxLicenseWithExceptionExpression]. Throws an [SpdxException] if the string cannot
Expand Down

0 comments on commit 9d0873c

Please sign in to comment.