Files
hakorune/tools/hako_check/tests/HC031_brace_heuristics/ng.hako
nyash-codex 89f1541918 WIP: HC031 (Brace Heuristics) - implementation ready, VM issues remain
⚠️ Status: Work In Progress
- Rule implementation complete but test fails due to VM execution issues
- Test shows empty diagnostics - possible VM crash during execution
- User fixed Rust-layer newline bug (HEX encoding), but deeper VM issue remains

 Implementation:
- tools/hako_check/rules/rule_brace_heuristics.hako: Complete implementation
  - Counts open/close braces (skips comments, handles string literals)
  - Reports mismatch with clear message format
- tools/hako_check/tests/HC031_brace_heuristics/: Test files ready
  - ok.hako: Balanced braces (2 open, 2 close)
  - ng.hako: Unbalanced braces (2 open, 1 close) - should trigger warning
  - expected.json: Expected warning defined

 Known Issues:
- VM execution fails before producing diagnostics JSON
- Test output: {"diagnostics":[]}
- Possible causes: Runtime error in rule code, VM memory issue
- Requires deeper investigation of VM execution path

🎯 Next steps:
- Debug VM execution with minimal HC031 test case
- Check if issue is in _split_lines, _remove_strings, or main logic
- Consider simplified version without string literal handling

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 04:17:57 +09:00

8 lines
126 B
Plaintext

// ng.hako - unbalanced braces (missing closing brace)
static box Main {
method main() {
return 0
// Missing brace
}