You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Spdx.Expressions 1.1.0
Resolve license references offline. Use SpdxReferenceContext.Resolve with the parsed expression and its source document. LicenseRef-X looks up X in that document. DocumentRef-V:LicenseRef-X looks up X in the target that the source document calls V. The application supplies the documents, bindings and definitions. Each occurrence retains its source span and returns the extracted license text on success. Separate outcomes identify unknown aliases, unavailable documents, missing definitions and duplicate declarations.
Read license fields without losing the original input.SpdxLicenseFieldReader.Read distinguishes a missing value, an empty string, NONE, NOASSERTION, a parsed expression, invalid syntax and a parse limit being exceeded. It preserves the original text and offsets. Reading a padded expression now scans the leading whitespace once. Existing calls to Parse and Validate keep their behavior.
Display names and links for licenses and exceptions. Catalogue entries expose Name, Reference and SeeAlso. Existing external catalogues remain supported, including those that omit these fields.
Build a diagnostic report. A runnable example shows a syntax error, a deprecated ID warning, an unknown ID, a LicenseRef occurrence and how to tell when the diagnostic list was truncated.