-
Notifications
You must be signed in to change notification settings - Fork 40
Support NONE and NOASSERTION in license expressions #307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
return new NoAssertionLicense(); | ||
} else if (SpdxConstantsCompatV2.NONE_VALUE.equals(token)) { | ||
return new NoneLicense(); | ||
}else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}else { | |
} else { |
AnyLicenseInfo result = LicenseInfoFactory.parseSPDXLicenseStringCompatV2("MIT AND NOASSERTION AND NONE"); | ||
assertEquals("(MIT AND NOASSERTION AND NONE)",result.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pmonks This part of the code targets SPDX 2.x. So it has to be separately resolved.
@pmonks @bact - thanks for the review and comments. You're correct in that these are not officially part of the spec. There's a tool out there that's generating these expressions and the library creates a really bad error message. I should probably change the code to just generate a decent error message rather than succeeding - hopefully we can add this to 3.1. |
It is possible that the code for 3.0 here (and its expression) will become valid, if eventually at some point NOASSERTION and NONE are added to the SPDX License List (without the need of spec amendment (3.1?)). Alternatively, if it is not preferred to have NOASSERTION and NONE as a license-id in the SPDX License List,
Both (1) and (2) require the spec amendment. |
Fixing the error message turned out to be problematic. I'll switch this PR to draft mode awaiting the outcome of the discussion on license expressions. |
No description provided.