grayskull icon indicating copy to clipboard operation
grayskull copied to clipboard

[FEATURE] Add comment to identified license if match is not perfect

Open jaimergp opened this issue 3 years ago • 5 comments

Is your feature request related to a problem? Please describe. grayskull will identify licenses by fuzzy match in some cases and then suggest the best result. However, sometimes the fuzzy match scores a bit lower than average because some people modify popular licenses like BSD or MIT and add their own clauses. This kind of change will turn those into a different license altogether, which should be named as LicenseRef-packagename.

Describe the solution you'd like I suggest:

  • Adding a comment next to the suggested identifier, saying that its match % was lower than usual license: MIT # warning! license might have been modified; search match is XX%.
  • If no clear license was found, generate a LicenseRef-packagename identifier with a comment next to it like # license could not be identified, please review.

Describe alternatives you've considered

Erroring out seems excessive.

Additional context

A recent example I found on a conda-forge submission.

jaimergp avatar Feb 17 '22 12:02 jaimergp

The match will never be perfect, so it will always need to add that comment

marcelotrevisani avatar Feb 23 '22 11:02 marcelotrevisani

Reopening that just because it still needs to add the comment But @ForgottenProgramme already added a warning about it. :)

marcelotrevisani avatar Feb 23 '22 19:02 marcelotrevisani