TagsCheck: handle license exception in first item of a grouping #1028
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.
The change in 7d707f7 (TagsCheck: handle license exception in grouping, 2023-03-03) is insufficient when the exception is on the first item in a grouping, e.g.:
Adjust
license_exception_regexto exclude a leading '(' as well as a trailing ')'.This fixes a variation of the same issue which #1014 intended to fix. I don't know why I thought a leading parenthesis would be handle by the
license_regexand not needed inlicense_exception_regex. (Just wishful thinking, perhaps.)Here is the spec file used to create the additional test srpm:
valid-exception-begin-grouping.spec.txt
If this doesn't warrant a separate srpm from the previous test, I could replace the srpm in the existing test case. This new srpm has an exception at the start and end of the grouping (by virtue of being a grouping with only one entry).
As always, I'm happy to adjust things as needed. Thanks!