Go Analysis Framework: modular static analysis by go team
by AbuAssar on 7/26/2026, 12:21:26 PM
https://pkg.go.dev/golang.org/x/tools/go/analysis
Comments
by: b7e7d855b448
You guys can keep complaining about how go is too verbose, but I love everything about go.<p>I love the error handling, I love the forced formatting, i love all the linting it has including style guides. When you read other source code it's so easy to understand it and make sense of it. Thank you go team<p>(Ok, maybe I am a bit sceptical with the latest generic additions, but overall it's a great language. I love it.)
7/26/2026, 5:07:50 PM
by: jzelinskie
For SpiceDB[0], we've found a lot of success using this framework to define our own analyzers; it's probably 10x easier now with LLMs. No need for tribal knowledge or more time wasted on code review if you can just turn it into a linter and move on.<p>[0]: <a href="https://github.com/authzed/spicedb/tree/main/tools/analyzers" rel="nofollow">https://github.com/authzed/spicedb/tree/main/tools/analyzers</a>
7/26/2026, 6:02:44 PM
by: jamescun
This isn't new?<p>You can see it's used by _a lot_ of linters already:<p><a href="https://pkg.go.dev/golang.org/x/tools/go/analysis?tab=importedby" rel="nofollow">https://pkg.go.dev/golang.org/x/tools/go/analysis?tab=import...</a>
7/26/2026, 1:52:15 PM
by: ksec
So what is context? This isn't new and why the submission ?
7/26/2026, 5:21:05 PM
by: mchav
Can these sorts of primitives be used to create broader "architectural" linters?
7/26/2026, 7:40:57 PM
by: hoppp
I was just looking for this. Will give it a spin.
7/26/2026, 1:19:26 PM
by: verdverm
The Go team's emphasis on tooling in the service of software engineering is a boon to human and agentic development alike. Give yourself and your agents great tools.<p>An example from one of my recent projects: <a href="https://github.com/verdverm/gmd/blob/main/Makefile" rel="nofollow">https://github.com/verdverm/gmd/blob/main/Makefile</a> (give agents simple "tool calls" instead of needing to divine the correct args/flags every time, essentially invocable agents.md content)<p>One of the interesting things to call out from this is using build tags for testing { unit, coverage, recorded, real api }, with the buffet allowing the agent to iterate faster and more targeted. I tend to run the linting and coverage in a new session, have a report generated, and then another fresh session to start dealing with gaps.<p>Another super cool testing tool in the Go internal source is `testscript`. Roger Peppe extracted a number of those internal utilities here <a href="https://github.com/rogpeppe/go-internal/tree/master/testscript" rel="nofollow">https://github.com/rogpeppe/go-internal/tree/master/testscri...</a>
7/26/2026, 6:49:52 PM
by: greatsage_sh
[flagged]
7/27/2026, 1:04:41 AM
by: k9294
[flagged]
7/26/2026, 6:00:57 PM
by: neet_dev
[flagged]
7/26/2026, 11:02:12 PM
by: someworkk
[flagged]
7/26/2026, 3:46:50 PM
by: dfasifsaf
[flagged]
7/26/2026, 2:22:30 PM