Skip to content

Conversation

@goneall
Copy link
Member

@goneall goneall commented Aug 24, 2022

When using the LicenseCompareHelper.isTextStandardLicense and there is text in the compare license text following a valid license text match, fail the license compare.

This issue was originally raised in spdx/license-list-XML#1583

Signed-off-by: Gary O'Neall [email protected]

@goneall
Copy link
Member Author

goneall commented Aug 24, 2022

Note that this fix is not yet complete. It is failing one of the regression tests where a license template ends with optional text.

goneall added a commit to spdx/license-list-XML that referenced this pull request Aug 24, 2022
The current `<alt match ... name="period">` has an incorrect regex that will not match the pattern `.,` which is present in the test file.  This will cause test failures once the LicenseListPublisher is updated with spdx/Spdx-Java-Library#97
goneall added a commit to spdx/license-list-XML that referenced this pull request Aug 24, 2022
The current `<alt match ... name="period">` has an incorrect regex that will not match the pattern `.,` which is present in the test file.  This will cause test failures once the LicenseListPublisher is updated with spdx/Spdx-Java-Library#97 

This is the same fix as #1587
goneall added a commit to spdx/license-list-XML that referenced this pull request Aug 24, 2022
An extra line present in the test file.  This will cause test failures once the LicenseListPublisher is updated with spdx/Spdx-Java-Library#97
goneall added a commit to spdx/license-list-XML that referenced this pull request Aug 25, 2022
This will cause test failures once the LicenseListPublisher is updated with spdx/Spdx-Java-Library#97
@goneall
Copy link
Member Author

goneall commented Aug 25, 2022

The following license fail to match against the text after this fix and should be investigated and resolved:

@goneall
Copy link
Member Author

goneall commented Aug 25, 2022

Note that almost all of the test failures due to the license matcher has an Optional at the very end of the XML file (most are optional Exhibits). Also note that the error indicates the missmatch is the first word after the start of the optional text.

@goneall
Copy link
Member Author

goneall commented Aug 25, 2022

@swinslow - looks like all of the errors in the LicenseListXML comparison are due to errors in the XML markups.

I fixed all exception GFDL-1.1-invariants-or-later, SGI-B-1.0, and SGI-B-1.1. For these, I think we should just remove the extra matching stuff in the last optional section. It would probably take 3-4 hours to get these more complex markups to work. Let me know what you think.

@goneall goneall marked this pull request as ready for review August 25, 2022 03:52
@swinslow
Copy link
Member

Thanks @goneall! This is awesome. Thanks for submitting all the fixes in the license-list-XML repo.

I will try to take a closer look at this soon. I'm about to be offline for a while, but will aim to review the PRs and the three remaining ones that you mentioned when I'm able to do so.

Add brackets '[]' to punctuation when tokenizing license strings
for compare.  This fixes an error when comparing the SGI-B-1.0 and
SGI-B-1.1 license texts.

Signed-off-by: Gary O'Neall <[email protected]>
@goneall goneall merged commit 7a9edb5 into master Sep 12, 2022
@goneall goneall deleted the liccompareend branch September 12, 2022 17:26
@bact bact added the matching License matching and recognition label Apr 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

matching License matching and recognition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants