5 Commits

Author SHA1 Message Date
Kazuki Yamada
ddd2814f84 fix(tests): Update test mocks to use new WorkerOptions interface 2025-08-31 16:32:49 +09:00
Kazuki Yamada
29e825e816 test(cli): Update binary file report tests for full path display
Updated test expectations to match the new behavior where binary files
are reported with full paths instead of relative paths.
2025-08-31 16:05:37 +09:00
Kazuki Yamada
a221ee7313 fix(cli): Address PR feedback for binary file reporting
- Replace empty return in fileCollectWorker with descriptive error
- Simplify array flattening using flatMap instead of reduce
- Make test assertions OS-agnostic using path.join
- Improve encoding error detection with confidence checks and BOM handling
2025-08-23 15:21:38 +09:00
Kazuki Yamada
8d117d94b7 refactor(cli): Clean up binary files detection output format
Remove redundant explanatory message from binary file listing to simplify output.
The main header already explains the detection method, making individual file
annotations unnecessary.

Changes:
- Remove "Detected as binary despite text extension" message from each file
- Improve type safety by using FileSkipReason type instead of string
- Update corresponding test expectations
- Clean up unused import in fileCollectWorker

The simplified output is cleaner while maintaining clarity about why files were excluded.
2025-08-23 14:52:47 +09:00
Kazuki Yamada
8bf797114b feat(cli): Report files detected as binary by content inspection
Add new "Binary Files Detected" section to CLI output that shows files which were
skipped due to binary content detection (not extension-based). This addresses issue #752
where users were not informed about files being silently excluded.

Changes:
- Update fileRead.ts to return detailed skip reasons (binary-extension, binary-content, size-limit, encoding-error)
- Modify file collection pipeline to track and propagate skipped files
- Add reportSkippedFiles function to display binary-content detected files
- Show files with relative paths and helpful exclusion messages
- Only display section when binary-content files are found
- Add comprehensive test coverage for new functionality

The implementation follows existing security check reporting patterns and provides
users clear visibility into why files were excluded from output.
2025-08-23 14:35:54 +09:00