| ▲ | gempir an hour ago | ||||||||||||||||
I wish Go had something like Ruff! A lot of languages are getting amazing tool but Go has a very fragmented ecosystem with a lot of tools but none of them feel as high quality has the likes of Ruff, Oxc, Biome or even PHP's Mago | |||||||||||||||||
| ▲ | alentred an hour ago | parent | next [-] | ||||||||||||||||
Oh wow, not so long ago the sentiment was exactly opposite. Python community was struggling with tools and everyone wished to have `gofmt` for Python. Granted, this is a linter, not a formatter, but my larger point is I am glad that Python ecosystem evolved like it did recently. | |||||||||||||||||
| |||||||||||||||||
| ▲ | gopherino 43 minutes ago | parent | prev | next [-] | ||||||||||||||||
It does and it is even better. It is called the Go Analysis Framework (https://pkg.go.dev/golang.org/x/tools/go/analysis). It is fairly new so not well known but it is what powers go fix and go vet under the hood. And I believe the Go team is currently working on making it possible for module authors to easily describe their own custom analysis passes that would run automatically when running go fix. It is extremely easy to define your own analysis.Analyzer struct that describes your own static analysis pass. You get access to all sorts of useful information such as the AST, types, even SSA info and you can even compose the information between analyzers. Then you can easily compile it into a binary and run it by passing that binary to go fix with a command line flag. The go toolchain itself handles all the complex caching logic so that your analyzers run fast. Since it is made by the go team itself and part of the toolchain it should slowly become the unified standard you are looking for. So hopefully golangci-lint and others should eventually all unify under this framework. You can easily give it a go by telling some AI agent to write some Go Analysis analyzers and telling them to drive them with go fix. My Go projects tend to accumulate a bunch of these to enforce all sorts of rules deterministically and automatically instead of some imprecise markdown file. | |||||||||||||||||
| |||||||||||||||||
| ▲ | bargainbin an hour ago | parent | prev | next [-] | ||||||||||||||||
I’m not entirely sure what you mean by a fragmented ecosystem? Go has first-party formatting and linting and the language is deliberately restricted to ensure it is written in a certain way, even when written by complete novices. Compare that to Python or TypeScript which are Wild West languages without opinionated first-party tooling, and it’s clear why Ruff/Biome feel great. You just wouldn’t get that same high with Go. | |||||||||||||||||
| |||||||||||||||||
| ▲ | 34 minutes ago | parent | prev | next [-] | ||||||||||||||||
| [deleted] | |||||||||||||||||
| ▲ | aki237 an hour ago | parent | prev | next [-] | ||||||||||||||||
What? I feel go has one of the best language tooling out there without requiring a bully ide to do stuff. golangci-lint is quite comprehensive. What do you miss otherwise? (Honestly go's distributing itself has covered a lot of it) | |||||||||||||||||
| |||||||||||||||||
| ▲ | brainzap an hour ago | parent | prev [-] | ||||||||||||||||
feel free to build it | |||||||||||||||||
| |||||||||||||||||