Repository navigation
Conversation
Signed-off-by: Henrik Sandklef <hesa@sandklef.com>
forcing text "as a special exception the author gives" Signed-off-by: Henrik Sandklef <hesa@sandklef.com>
There was a problem hiding this comment.
Thanks++ @hesa see comments for your consideration wrt.:
- deprecating rules vs changing the text
- using required_phrases vs minimum_coverage
Also lots of text failures which are related to your changes and we need to update test expectations there.
For example:
SCANCODE_REGEN_TEST_FIXTURES=yes pytest -vvs tests/packagedcode/test_debian_copyright.py::TestDebianCopyrightLicenseDetection::test_debian_parse_copyright_file_detailed_main_g_gnupg2_stable_copyright --test-suite=validate
All of the related test failures seem to be for debian copyright files where we need to update expectations.
| notes: small variant | ||
| --- | ||
|
|
||
| This file is free software; as a special exception the author gives |
There was a problem hiding this comment.
We cannot change rule text content, instead we should deprecate a rule and create new rules as required as these are useful reference for detections.
There was a problem hiding this comment.
Otherwise folks using an older version and getting a match with this rule would be confused about the matched text. We ourselves also use this for diff btw
| is_required_phrase: yes | ||
| --- | ||
|
|
||
| This program is free software; {{as a special exception the author gives}} |
There was a problem hiding this comment.
Not sure if this a good idea to keep "author" in required phrases, as this could change, though I have not found any cases where other authors are used. Setting a high minimum_coverage is another option, when there aren't great required phrases.
Fixes #3934
Tasks
Run tests locally to check for errors.