The scanner tests in tests/test_scanner.c only test basic directory scanning (single file, multiple files, subdirectories, empty directory). They do NOT test:
Exclude patterns (the --exclude functionality)
Include patterns (the --include functionality)
Size filtering (--max-size, --min-size)
Metadata collection when enabled
Chunk size boundaries
Pattern with / in paths (the glob_match test covers slash filtering, but the scanner doesn't)
Location
tests/test_scanner.c:125-130
Suggested Fix
Add tests that exercise the scanner's pattern-matching and size-filtering capabilities:
staticvoidtest_scanner_exclude_pattern(){// Create directory with a.txt and b.txt
// Configure scanner with exclude pattern "*.txt"
// Verify only non-.txt files appear in output
}
Also test that patterns are matched against the filename (not full path), and that the scanner correctly handles multiple include patterns as a whitelist.
Severity
Low
Category
Quality
## Description
The scanner tests in `tests/test_scanner.c` only test basic directory scanning (single file, multiple files, subdirectories, empty directory). They do NOT test:
1. Exclude patterns (the `--exclude` functionality)
2. Include patterns (the `--include` functionality)
3. Size filtering (`--max-size`, `--min-size`)
4. Metadata collection when enabled
5. Chunk size boundaries
6. Pattern with `/` in paths (the `glob_match` test covers slash filtering, but the scanner doesn't)
## Location
`tests/test_scanner.c:125-130`
## Suggested Fix
Add tests that exercise the scanner's pattern-matching and size-filtering capabilities:
```c
static void test_scanner_exclude_pattern() {
// Create directory with a.txt and b.txt
// Configure scanner with exclude pattern "*.txt"
// Verify only non-.txt files appear in output
}
```
Also test that patterns are matched against the filename (not full path), and that the scanner correctly handles multiple include patterns as a whitelist.
## Severity
Low
## Category
Quality
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
The scanner tests in
tests/test_scanner.conly test basic directory scanning (single file, multiple files, subdirectories, empty directory). They do NOT test:--excludefunctionality)--includefunctionality)--max-size,--min-size)/in paths (theglob_matchtest covers slash filtering, but the scanner doesn't)Location
tests/test_scanner.c:125-130Suggested Fix
Add tests that exercise the scanner's pattern-matching and size-filtering capabilities:
Also test that patterns are matched against the filename (not full path), and that the scanner correctly handles multiple include patterns as a whitelist.
Severity
Low
Category
Quality