Documentation
¶
Overview ¶
Package ruleset 渲染并分发框架规则集:.golangci.yml、.go-arch-lint.yml 与域仓库的 CI 引用文件。模板由 appkit sync 物化进各仓库,CI 做漂移检查 (见 docs/DESIGN.md §7:物化解决 IDE 集成与 golangci-lint 无配置继承的问题)。
Index ¶
Constants ¶
const ( GolangciLintVersion = "v2.13.2" ArchLintVersion = "v1.18.0" )
域仓库 lint 工具链的钉版本。域仓库的 Makefile(lint 目标)与 appkit 的 .github/workflows/domain-ci.yml 必须跑同一个版本——版本不一致就会出现 「本地绿、CI 红」,而这正是规则集物化要消灭的那类事故。 两处一致由 ruleset 的 TestLinterVersionsMatchCI 守住;升级改这里。
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppConfig ¶
type AppConfig struct {
Version int `yaml:"version"`
Kind string `yaml:"kind"` // domain(默认)或 system
Domain string `yaml:"domain"`
Module string `yaml:"module"`
Contracts string `yaml:"contracts"`
AllowRequires []string `yaml:"allowRequires"`
// Partitioned 是「分区域域」标记(appkit new domain -partitioned 写入)。
// ruleset 不消费它,这里收下只为与 archcheck.Config 共用一份配置文件。
Partitioned bool `yaml:"partitioned"`
}
AppConfig 对应 .appkit.yml(版本恒为 1)。
func LoadAppConfig ¶
LoadAppConfig 读取并校验 dir 下的 .appkit.yml。