Repository navigation
Detect agpl-3.0_326 rule text as agpl-3.0-plus - #5336
Open
aishwary-dongre wants to merge 1 commit into
Open
aishwary-dongre wants to merge 1 commit into
aishwary-dongre wants to merge 1 commit into
Conversation
The text of agpl-3.0_326.RULE grants the GNU Affero General Public
Licence "either version 3 of the Licence, or (at your option) any later
version", which is AGPL-3.0-or-later, but the rule declared
license_expression: agpl-3.0. Any file matching this notice was reported
as AGPL-3.0-only.
Correct the expression to agpl-3.0-plus and rename the rule to
agpl-3.0-plus_311.RULE so the file name matches its expression, as done
for other expression corrections. 311 is the next free number returned
by find_rule_base_location('agpl-3.0-plus').
The deprecated agpl-3.0_330.RULE, a "license" spelling variant of the
same notice, is detected through this rule, so its replaced_by is
updated from agpl-3.0 to agpl-3.0-plus to match. Without this its
deprecated-rule validation test fails.
Reference: aboutcode-org#5002
Signed-off-by: Aishwary Dongre <87765118+aishwary-dongre@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #5002
Brief description
agpl-3.0_326.RULEgrants the AGPL "either version 3 of the Licence, or (at your option) any later version", which is AGPL-3.0-or-later, but it declaredlicense_expression: agpl-3.0. Any file matching this notice was reported as AGPL-3.0-only.This PR:
agpl-3.0-plusagpl-3.0-plus_311.RULEso the name matches the expression, as in other expression corrections such as 94a4d35.311is whatfind_rule_base_location('agpl-3.0-plus')returns. No code or test fixture refers to the old file name.replaced_byin the deprecatedagpl-3.0_330.RULEfromagpl-3.0toagpl-3.0-plus. That rule is the "license" spelling of the same notice, and it is detected through this one, so its expected detection changes with it. Without this,test_validate_detect_deprecated_agpl_3_0_330_rulefails.Before / after
Matching the full rule text against a freshly built index:
developagpl-3.0_326.RULEagpl-3.0agpl-3.0-plus_311.RULEagpl-3.0-plusAbout #5001
#5001 reported that the GIMP header
app/widgets/gimpdashboard.hmatched this rule. On currentdevelopI could not reproduce that. The current upstream file is detected asgpl-3.0-plusviagpl-3.0-plus_60.RULEat 100% coverage, both before and after this change. So this PR fixes the rule named in #5002. I am not claiming it resolves #5001, which may already have been fixed by other rule changes.Tests
With a license index rebuilt from this branch:
test_validate_detect_agpl_3_0_plus_311_ruleandtest_ignorables_in_rule_or_license_agpl_3_0_plus_311_rulepasstest_detection_validate.pypass (--test-suite=validate -k agpl)-k deprecated). This is the class of test a changed expression can break, which is how I foundagpl-3.0_330.tests/licensedcode/test_license_models.py: 50 passedI did not run the full 76k-test validation suite locally, so I am relying on the
license_validate_*CI shards for the rest.Possibly related, out of scope
Two non-deprecated rules are word-for-word variants of this notice and look like the same bug. Their file names even say
plus, but they declareagpl-3.0:agpl-3.0-plus_4.RULE, thehttp://variant of this exact textagpl-3.0-plus_6.RULEI have not changed them because #5002 is about
_326only. Their history is mixed too:agpl-3.0-plus_3is deprecated withreplaced_by: agpl-3.0-plus, while_5and_7point atagpl-3.0. So I would rather have a maintainer confirm the intent first. I am happy to include them here or open a follow-up.AI generation disclosure
I used an AI assistant on this: finding the rule-naming convention in history, building the before/after detection check, running the validation tests, and drafting this description. I reviewed and verified every claim against the repository myself, and I can explain and defend the change. Flagging it since ScanCode states no policy either way.
Tasks