Allow configuration of sources when determining licenses #377
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, Licensee prefers the URL of license POM entries to determine the correct SPDX entry. From what I understood, this decision was made based on practicality because the data suggested that it would lead to better results at the time. Though, technically, this is incorrect as the license name should usually be an SPDX identifier while the URL can be arbitrary. From my experience, this is the wrong default for projects, I am working on. I'm not the first person to express interest in matching by name and this has been brought up numerous times on the issue tracker and Slack before. In fact, this has even caused some projects to omit the license URL altogether.
To rectify this unfortunate default (without breaking compatibility for current users), I propose to make the sources used to determine the license configurable. This is an implementation of the behavior I initially described in #137 (comment):
I'm aware that documentation is missing and there is probably some more room for improvements but I'm reaching out now to check if there even is interest in merging this feature.