spdx / Spdx-Java-Library

Java library which implements the Java object model for SPDX and provides useful helper functions
Apache License 2.0
37 stars 36 forks source link

Fixes for end of license matches #221

Closed goneall closed 11 months ago

goneall commented 11 months ago

Fixes #214 Fixes #213

This is currently a draft - I would like to investigate issue #217 before completing this PR.

That being said, review comments are welcome.

goneall commented 11 months ago

Fixes #217

Redesigned the matching so that optional text is accurately matched

goneall commented 11 months ago

@pmonks - if you could take a look at this PR - it fixes the current known license matching issues.

It is a bit of a redesign. Instead of doing a general .* type match for the optional text, it does a token match of the license matches.

The PR has more duplicated code than I would like, but I could find a clean way to refactor the code out.

Thanks.

goneall commented 11 months ago

I think I'll go ahead and merge this PR as is since it seems to fix the current set of matching issues.

I also need to generate a new release of the library for some downstream dependencies.

I created issue #222 to track some ideas on refactoring the much to complex code in LicenseCompareHelper

pmonks commented 11 months ago

Sorry I wasn't able to get to this @goneall - I was at a tournament all day Sunday, then recovering from it yesterday. 😬