Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ScanCode: Gracefully handle underscores in ScanCode license keys
ScanCode version 3.2.1rc, which is currently in use in ORT, has one license (overall) [1] with an underscore in its license key. ScanCodeResultParser turns the license keys into SPDX 'LicenseRef-*' identifiers strings, and when these get parse via toSpdx() in the constructor of LicenseFinding ORT exits with an uncaught exception. The exception is thrown because underscores are not allowed in SPDX id strings. Fix this by turning underscores into dashes. Note: This change could potentially be reverted in favor of an upstream fix in ScanCode. [1] https://github.com/nexB/scancode-toolkit/blob/v3.2.1rc2/src/licensedcode/data/licenses/x11-xconsortium_veillard.yml Signed-off-by: Frank Viernau <[email protected]>
- Loading branch information