nyash-codex
375edb2a1b
HC021 implementation complete: Analyzer IO Safety
✅ Implementation:
- tools/hako_check/rules/rule_analyzer_io_safety.hako: New rule detecting direct I/O in analyzer rules
- Detects: new FileBox(), .open(), .read(), .write(), network I/O
- CLI-internal push approach: rules should receive data through parameters
- Successfully detects FileBox usage in rule_dead_methods.hako:13-14
✅ Tests:
- tools/hako_check/tests/HC021_analyzer_io_safety/: Complete test suite
- ok.hako: Safe rule using CLI-internal push approach
- ng.hako: Unsafe rule using direct FileBox I/O (3 warnings expected)
- Test passes with all diagnostics matching
✅ Integration:
- tools/hako_check/cli.hako: Added HC021 rule invocation
- All existing tests (HC011-HC022) remain green
🎯 Achievement:
- Priority task completed as requested
- Validates "CLI内push案" (CLI-internal push approach) design
- Encourages safer analyzer rule development
🤖 Generated with Claude Code (https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>