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

Templates with <<var... tags in a string without spaces does not match correctly #28

Open goneall opened 3 years ago

goneall commented 3 years ago

Since the license matching is tokanized and the var tags assume the regular expression is a token, it likely will not match a string in the middle of an expression.

It will also match when the template has an incorrect space (see LicenseListXML issue https://github.com/spdx/license-list-XML/issues/1146).

goneall commented 3 years ago

This turns out to be a very challenging fix - we need access to the alt tag spacing hints which are not preserved in the template.

There are two approaches I can think of:

Once Yalm passes all of the tests and we have some basic performance comparisons, I plan to look into the first approach.