From b856c98803fda34b9bc6d783afa153abb47f6d73 Mon Sep 17 00:00:00 2001 From: Andrew Nesbitt Date: Mon, 3 Aug 2026 12:44:51 +0100 Subject: [PATCH 1/2] Match NOTICE files with a wildcard like license does 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. --- detect/detect_test.go | 4 ++-- knowledge/_shared/_resources.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/detect/detect_test.go b/detect/detect_test.go index 7769f29..7f8c336 100644 --- a/detect/detect_test.go +++ b/detect/detect_test.go @@ -258,7 +258,7 @@ func TestResourceGroups(t *testing.T) { touch("README.md") touch("CHANGELOG.md") touch("AGENTS.md") - touch("NOTICE") + touch("NOTICES.md") touch("CONTRIBUTING.md") touch(".github/CODE_OF_CONDUCT.md") touch(".github/CODEOWNERS") @@ -283,7 +283,7 @@ func TestResourceGroups(t *testing.T) { if res.Agents["agents"] != "AGENTS.md" { t.Errorf("agents.agents = %q", res.Agents["agents"]) } - if res.Legal["notice"] != "NOTICE" { + if res.Legal["notice"] != "NOTICES.md" { t.Errorf("legal.notice = %q", res.Legal["notice"]) } if res.Community["contributing"] != "CONTRIBUTING.md" { diff --git a/knowledge/_shared/_resources.toml b/knowledge/_shared/_resources.toml index 6925744..ead4576 100644 --- a/knowledge/_shared/_resources.toml +++ b/knowledge/_shared/_resources.toml @@ -43,7 +43,7 @@ patterns = ["copyright", "copyright.md", "copyright.txt"] name = "Notice" field = "notice" group = "legal" -patterns = ["notice", "notice.md", "notice.txt"] +patterns = ["notice*"] dirs = ["docs", ".github", ".gitlab"] [[resources]] From 8b03a42f164e642fd056ebba2cca550a31d9aa85 Mon Sep 17 00:00:00 2001 From: Andrew Nesbitt Date: Mon, 3 Aug 2026 12:58:18 +0100 Subject: [PATCH 2/2] List explicit notice/notices patterns instead of trailing glob Per CONTRIBUTING.md guidance for prose resource files, avoid a bare notice* which would match unrelated Notice-prefixed files in docs/. --- knowledge/_shared/_resources.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knowledge/_shared/_resources.toml b/knowledge/_shared/_resources.toml index ead4576..ec433bf 100644 --- a/knowledge/_shared/_resources.toml +++ b/knowledge/_shared/_resources.toml @@ -43,7 +43,7 @@ patterns = ["copyright", "copyright.md", "copyright.txt"] name = "Notice" field = "notice" group = "legal" -patterns = ["notice*"] +patterns = ["notice", "notice.md", "notice.txt", "notices", "notices.md", "notices.txt"] dirs = ["docs", ".github", ".gitlab"] [[resources]]