feat: --check 标志只验证DSL覆盖率不跑牌局

用法: dotnet run --project Demo -- --check --dsl new_variant
输出: 能力覆盖率 + 合规检查 + 仅验证模式退出

文档: README + dsl-specification 更新创建流程
This commit is contained in:
xiaoou
2026-07-04 22:09:39 +08:00
parent 2ef8583180
commit a338dac139
3 changed files with 26 additions and 2 deletions

View File

@ -5,6 +5,7 @@ using RuleEngine.Dsl;
// Parse arguments
bool autoMode = args.Contains("--auto");
bool humanMode = args.Contains("--human");
bool checkOnly = args.Contains("--check");
string dslPath = "dsl-examples/xuezhandaodi.yaml";
int dslIdx = Array.IndexOf(args, "--dsl");
if (dslIdx >= 0 && dslIdx + 1 < args.Length)
@ -64,6 +65,12 @@ catch (Exception ex)
return 1;
}
if (checkOnly)
{
Console.WriteLine($"✅ 仅验证模式 — 未运行牌局");
return 0;
}
if (autoMode)
{
// Batch mode: run N rounds silently