Snagless: build-time checks for SwiftUI @Environment, built on SwiftSyntax

Snagless is a SwiftPM build tool plugin (also works in Xcode projects and from the command line) that fails the build when a SwiftUI view can be shown without an @Environment(Type.self) or @EnvironmentObject value it needs.

It never type-checks. Each file is summarized on its own with SwiftSyntax, then the summaries are linked across modules using each file's imports into one graph of which view shows which. Needs are pushed up the graph to a fixpoint and checked at every root: App scenes, previews, widgets and hosting controllers. When it can't tell a value's type, it reports it as unresolved rather than guessing.

Every rule it encodes about SwiftUI is backed by a simulator case (53 so far, on iOS 27). It ships as a prebuilt artifact bundle, so users don't compile swift-syntax, and as static Linux binaries for CI.

Write-up: SwiftUI environment crashes compile just fine. So I made them fail the build. — tarek-builds
Repo: GitHub - tareksabry1337/snagless: Static checker for SwiftUI environment crashes · GitHub