Skip to content

Fix missing ignorable_urls in fsl-1.1 rules - #5362

Open
Gracy769 wants to merge 1 commit into
aboutcode-org:developfrom
Gracy769:fix-fsl-1.1-ignorable-urls
Open

Gracy769 wants to merge 1 commit into
aboutcode-org:developfrom
Gracy769:fix-fsl-1.1-ignorable-urls

Conversation

@Gracy769

Copy link
Copy Markdown

Summary

This PR fixes missing ignorable_urls declarations in src/licensedcode/data/rules/fsl-1.1_1.RULE and src/licensedcode/data/rules/fsl-1.1_2.RULE.

Problem & Motivation

In recent develop branch builds, Azure Pipelines CI has been failing on the license_validate_ignorables_2 test suite (e.g. Build 19540 on develop):

FAILED tests/licensedcode/test_detection_validate.py::TestValidateLicenseIgnorableClues2::test_ignorables_in_rule_or_license_fsl_1_1_1_rule
FAILED tests/licensedcode/test_detection_validate.py::TestValidateLicenseIgnorableClues2::test_ignorables_in_rule_or_license_fsl_1_1_2_rule

AssertionError: assert 'ignorable_urls:\n - https://fsl.software/FSL-1.1-ALv2.template.md\nfile: .../fsl-1.1_1.RULE\n' == '{}\n'

Commits a49e06f and 9eaa41d introduced fsl-1.1_1.RULE and fsl-1.1_2.RULE, both of which contain the URL https://fsl.software/FSL-1.1-ALv2.template.md, but neither rule declared ignorable_urls in their YAML frontmatter.

During check_ignorable_clues(), models.get_ignorables() detects the template URL from the text, while models.get_normalized_ignorables() returns empty {} because the rule metadata was missing the declaration, causing the validation assert to fail.

Changes

  • Added ignorable_urls: - https://fsl.software/FSL-1.1-ALv2.template.md to src/licensedcode/data/rules/fsl-1.1_1.RULE.
  • Added ignorable_urls: - https://fsl.software/FSL-1.1-ALv2.template.md to src/licensedcode/data/rules/fsl-1.1_2.RULE.

Testing

Verified in Python using licensedcode.models:

r1 = models.Rule.from_file('src/licensedcode/data/rules/fsl-1.1_1.RULE')
r2 = models.Rule.from_file('src/licensedcode/data/rules/fsl-1.1_2.RULE')
assert models.get_ignorables(text=r1.text) == models.get_normalized_ignorables(r1)
assert models.get_ignorables(text=r2.text) == models.get_normalized_ignorables(r2)

Both rules now match cleanly.

Signed-off-by: Gracy769 <169199616+Gracy769@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 15, 2026 01:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants