Documentation
¶
Overview ¶
Package archlint owns the tree walk shared by the architecture-lint gate tests. Seven gates used to carry private copies of the same WalkDir loop, and the copies drifted: six skipped {".git", "vendor", "node_modules", "dist", "testdata", "scratch", ".claude"} while the store gate skipped every dot-prefixed directory plus "examples" and kept scanning testdata. This package is the union of those lists, as one table:
skip (directory name) why
----------------------------------------------------------------------------
any "."-prefixed name .git, .claude (agent worktrees), e2e/.tmp
vendor, node_modules dependency trees
dist build output
testdata per-package fixtures
scratch gitignored working notes
examples shipped fixtures (demo.db and friends), never code
"test-results" prefix Playwright artifacts, wiped and recreated by
parallel e2e runs — racing a wipe is the GDK-1486
flake; no .go file ever lives there anyway
Rules stay in their own packages, next to the code they lock; this package owns only the walk, the skip list, slash-relative paths, parsing, and the in-process parse cache. The cache lives inside one test binary: `go test ./...` runs each package as its own process, so only gate pairs inside one package (internal/origin, internal/sync) share it — there is no cross-package caching.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Walk ¶
Walk visits every .go file under root that survives the shared skip list, in filepath.WalkDir order (lexical within each directory). Production and test files are both delivered; each rule filters by suffix and prefix itself. Rel is slash-separated on every platform. An error returned by visit aborts the walk and is returned unchanged, as are walk errors — except ENOENT: a directory another process removed mid-walk (a parallel Playwright run wiping test-results/, GDK-1486) skips quietly instead of failing the whole gate over a path that never held source.
Types ¶
type File ¶
type File struct {
Path string // filesystem path as walked (joined onto Walk's root)
Rel string // slash-separated path relative to Walk's root
}
File is one .go file discovered by Walk. AST and Src are lazy, so a rule that filters files out by suffix or prefix never pays for what it skips.