Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/license-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,15 @@ jobs:
if name:
# pip canonicalises dashes/underscores/dots to hyphens.
canonical = re.sub(r'[-_.]+', '-', name).lower()
self_pattern = rf"(?i:^{re.escape(canonical)}$)"
# pilosus matches the full "name:version:license" identifier, so anchor the
# name then allow the version separator or end-of-string (a bare ^name$ never
# matches "name:1.2.3:License").
self_pattern = rf"(?i:^{re.escape(canonical)}(?::|$))"

# 2. Central whitelist (one anchored alternation per package).
# tqdm — dual-licensed MPL-2.0 AND MIT; permissive via the MIT option,
# used as an unmodified imported library (pulled by huggingface_hub).
central = r"(?i:^tqdm$)"
central = r"(?i:^tqdm(?::|$))"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update whitelist documentation to match the new regex contract.

Line 158 updates tqdm to (?i:^tqdm(?::|$)), but the documented source-of-truth pattern still shows the old ^tqdm$ form. Please update docs/license-whitelist.md in the same PR so the human-auditable contract matches the workflow behavior.

As per coding guidelines, “When you change one, change the other to match” in the whitelist documentation/workflow contract.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/license-check.yml at line 158, The regex pattern for tqdm
in the license-check.yml workflow has been updated to (?i:^tqdm(?::|$)), but the
documented whitelist pattern in docs/license-whitelist.md still shows the old
^tqdm$ form. Update the tqdm entry in docs/license-whitelist.md to use the new
regex pattern (?i:^tqdm(?::|$)) to ensure the documentation matches the actual
workflow behavior and maintains the source-of-truth contract.


# 3. Caller-supplied repo-specific excludes.
caller = (os.environ.get("CALLER_EXCLUDE") or "").strip()
Expand Down