Conversation
|
One suggestion: might be worth attempting to parse a name as an SPDX expression, rather than just an identifier. SPDX expressions do appear in Maven POMs already (albeit rarely on Maven Central - they're a lot more common on Clojars though), and hopefully with the Maven team recommending their use they'll become more common. And of course this will also match all possible singleton license identifiers too. |
@pmonks - I updated the code to match license expressions and added some unit tests |
This partially addresses issue #165 by matching a Maven license reference to an SPDX license ID if the name matches the SPDX license identifier. This check is performed after the URL checking, so URLs take precedence. This commit also updates the licenses.json resource file to version 3.28 The resource file is used if the SPDX license.json could not be fetched from the internet. Signed-off-by: Gary O'Neall <gary@sourceauditor.com>
Signed-off-by: Gary O'Neall <gary@sourceauditor.com>
|
@goneall Could we merge this PR, do you need any help validating this PR? |
Help validating would be much appreciated - if you could either do a quick review or validate, I'll merge. |
Change suggested by Copilot code review Signed-off-by: Gary O'Neall <gary@sourceauditor.com>
This partially addresses issue #165 by matching a Maven license reference to an SPDX license ID if the name matches the SPDX license identifier. This check is performed after the URL checking, so URLs take precedence.
This commit also updates the licenses.json resource file to version 3.28 The resource file is used if the SPDX license.json could not be fetched from the internet.