mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 16:27:33 -10:00
internal/structure parses every Go file in the repo, tests and every platform's included, and checks what linters don't, as part of mise run test. Each failure names its rule and file:line: - max-methods: at most 24 methods a type; largeTypes lists the larger ones (the backends and backendtest's Fake, which implement backend.Backend; paths.Dirs, ui.UI, tools.Tools, build.Builder), each capped at its count - no-init: no func init, tests included - package-vars: outside internal/proxy, only interface checks, error sentinels, compiled regexps and templates, sync.Once* values, embedded files, and what allowedVars lists with why (ldflags values, fixed tables, test fixtures) - layers: only cmd/devvm and cli import ui; only cli imports vm; only cmd/devvm imports cli; backends import none of the packages above them; only cli and the registry name a backend; only tests import backendtest; proxy imports no devvm package; assets, locales, platform, msg, paths, state and image import only what's below them TestRulesFail breaks each rule and each layer on in-memory sources. A new vm.creation type holds create, plan and undoCreate, keeping Launch under the limit; msg/gen checks fields with idRe. Contributing describes the test, AGENTS.md points at it. Co-Authored-By: Claude Opus 5.5 <[email protected]>