refactor: address reviewer feedback

- Add options={} parameter to run() to match run-with-flags.js contract
- Remove case-insensitive flag from extension pre-filter for consistency
  with ADHOC_FILENAMES regex (both now case-sensitive)
- Expand warning text to list more structured paths
- Add test cases for uppercase extensions (TODO.MD, NOTES.TXT)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Signed-off-by: Lidang-Jiang <lidangjiang@gmail.com>
This commit is contained in:
Lidang-Jiang
2026-03-29 10:09:02 +08:00
parent 27d71c9548
commit 3c3781ca43
2 changed files with 7 additions and 5 deletions

View File

@@ -102,7 +102,7 @@ function runTests() {
}) ? passed++ : failed++);
}
// 5. Lowercase and partial-match filenames - NOT on denylist, no warning
// 5. Lowercase, partial-match, and non-standard extension case - NOT on denylist
const allowedNonDenylist = [
'random-notes.md',
'notes.txt',
@@ -111,6 +111,8 @@ function runTests() {
'todo-list.md',
'my-draft.md',
'meeting-notes.txt',
'TODO.MD',
'NOTES.TXT',
];
for (const file of allowedNonDenylist) {
(test(`allows non-denylist doc file: ${file}`, () => {