Skip to content

Match NOTICE files with a wildcard like license does - #125

Merged
andrew merged 2 commits into
mainfrom
widen-notice-pattern
Aug 3, 2026
Merged

Match NOTICE files with a wildcard like license does#125
andrew merged 2 commits into
mainfrom
widen-notice-pattern

Conversation

@andrew

@andrew andrew commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

The explicit ["notice", "notice.md", "notice.txt"] list missed NOTICES (plural) and extensions other than .md/.txt. notice* covers NOTICE, NOTICES, NOTICE.rst, NOTICE-THIRD-PARTY and so on, matching how the license entry already uses license*.

Aligns with how git-pkgs/licenses recognises notice files (isLegalFile accepts both notice and notices prefixes).

The explicit list missed NOTICES (plural) and extensions other than
.md/.txt. notice* covers NOTICE, NOTICES, NOTICE.rst, NOTICE-THIRD-PARTY
and so on, matching how the license entry already works.

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.

Pull request overview

This PR updates the shared knowledge-base resource patterns so “Notice” files are detected using a wildcard (similar to license matching), and adjusts the resource-group test to validate detection with a pluralized notice filename.

Changes:

  • Changed Notice resource patterns from an explicit list to a wildcard pattern.
  • Updated TestResourceGroups to create and assert against NOTICES.md instead of NOTICE.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
knowledge/_shared/_resources.toml Broadens Notice-file detection patterns to match more notice naming variants.
detect/detect_test.go Updates resource-group fixture and assertion to validate the new notice matching behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread knowledge/_shared/_resources.toml Outdated
Per CONTRIBUTING.md guidance for prose resource files, avoid a bare
notice* which would match unrelated Notice-prefixed files in docs/.
@andrew
andrew merged commit 01a53d6 into main Aug 3, 2026
8 checks passed
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