Phase 21.3 WIP: Hako Source Checker improvements - HC011/HC016/HC017 実装完了

主な変更:
-  HC011 (dead methods) 実装・テスト緑
-  HC016 (unused alias) 実装・テスト緑
-  HC017 (non-ascii quotes) 実装完了
- 🔧 tokenizer/parser_core 強化(AST優先ルート)
- 🛡️ plugin_guard.rs 追加(stderr専用出力)
- 📋 テストインフラ整備(run_tests.sh改善)

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
nyash-codex
2025-11-08 00:46:34 +09:00
parent 647e15d12e
commit 58a6471883
39 changed files with 1435 additions and 283 deletions

View File

@ -67,30 +67,13 @@ impl NyashRunner {
}
std::env::set_var("NYASH_PLUGIN_OVERRIDE_TYPES", override_types.join(","));
// Strict mode: verify providers exist for override types
if crate::config::env::env_bool("NYASH_VM_PLUGIN_STRICT") {
let v2 = nyash_rust::runtime::get_global_registry();
let mut missing: Vec<String> = Vec::new();
for t in [
"FileBox",
"ConsoleBox",
"ArrayBox",
"MapBox",
"StringBox",
"IntegerBox",
] {
if v2.get_provider(t).is_none() {
missing.push(t.to_string());
}
}
if !missing.is_empty() {
eprintln!(
"❌ VM plugin-first strict: missing providers for: {:?}",
missing
);
std::process::exit(1);
}
}
// Centralized plugin guard
let strict = crate::config::env::env_bool("NYASH_VM_PLUGIN_STRICT");
crate::runner::modes::common_util::plugin_guard::check_and_report(
strict,
quiet_pipe,
"vm",
);
}
// Read the file