Skip to content

Ch14. Guard 规范检查引擎

50+ 内置规则,四层检查引擎 — 从正则到语义的纵深检查。

本章概要

Guard 是 AutoSnippet 的代码规范检查系统。本章解析四层检查引擎的设计、50+ 内置规则的组织方式、ReverseGuard 机制以及规则学习反馈循环。

四层检查引擎

Layer 1: 正则 / 模式匹配

Layer 2: AST 结构检查

Layer 3: 语义检查

Layer 4: 跨文件检查

ReverseGuard

规则学习反馈循环

关键代码

小结

Released under the MIT License.