Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge. Learn more →
Top 23 Go Code Analysis Projects
-
Project mention: Show HN: Error return traces for Go, inspired by Zig | news.ycombinator.com | 2023-11-29
The "standard linter" in Go is https://golangci-lint.run/ , which includes [1] the absolutely-vital errcheck which will do that for you.
For an Advent of Code challenge you may want to turn off a lot of other things, since the linter is broadly tuned for production, public code by default and you're creating burner code and don't care whether or not you have godoc comments for your functions, for instance. But I suggest using golangci-lint rather than errcheck directly because there's some other things you may find useful, like ineffassign, exportloopref, etc.
-
Project mention: How to find all methods which return struct "Foo" (vscode or cli) | /r/golang | 2023-06-12
Just a guess, but it might be somewhere in gopls https://github.com/golang/tools/tree/master/gopls/doc On this page https://langserver.org/ it says it should support "finding references"
-
Onboard AI
Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.
-
revive
🔥 ~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint
The v1.3.4 of revive, the fast, configurable, extensible, flexible, and beautiful linter for Go, is available.
-
In our codebase I noticed a few cases where people ignored errors returned from functions by assigning them to _, ie result, _ := foo(). The errcheck linter doesn't seem to catch this, does anyone know of a linter that does?
-
-
-
go-cleanarch
Clean architecture validator for go, like a The Dependency Rule and interaction between packages in your Go projects.
-
InfluxDB
Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.
-
-
go-mod-outdated
Find outdated dependencies of your Go projects. go-mod-outdated provides a table view of the go list -u -m -json all command which lists all dependencies of a Go project and their available minor and patch updates. It also provides a way to filter indirect dependencies and dependencies without updates.
-
goreturns
A gofmt/goimports-like tool for Go programmers that fills in Go return statements with zero values to match the func return types
-
-
-
-
-
-
bodyclose
Analyzer: checks whether HTTP response body is closed and a re-use of TCP connection is not blocked.
Project mention: TIL: Go Response Body MUST be closed, even if you don’t read it - Manish R Jain | /r/golang | 2023-05-12 -
-
That was one of the options I considered. To create something reusable by others, though, I think that requires creating the Gist, configuring the Gist's URL and creating/configuring an authentication token. This OTOH just requires enabling the Wiki.
-
-
-
-
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Go Code Analysis related posts
- Show HN: Error return traces for Go, inspired by Zig
- Hacking Go to give it sum types
- Linter to check for errors ignored with _
- Golang panics in libraries
- 9 Golang Name Conventions Gophers should follow!
- Is it a bad convention to overwrite err variable?
- How to find all methods which return struct "Foo" (vscode or cli)
-
A note from our sponsor - InfluxDB
www.influxdata.com | 10 Dec 2023
Index
What are some of the best open-source Code Analysis projects in Go? This list will help you:
Project | Stars | |
---|---|---|
1 | golangci-lint | 13,632 |
2 | goimports | 7,058 |
3 | revive | 4,455 |
4 | errcheck | 2,162 |
5 | GoPlantUML | 1,594 |
6 | PHP-Parser | 930 |
7 | go-cleanarch | 779 |
8 | golines | 733 |
9 | go-mod-outdated | 639 |
10 | goreturns | 520 |
11 | Chronos | 407 |
12 | todocheck | 403 |
13 | unconvert | 365 |
14 | dupl | 319 |
15 | tickgit | 313 |
16 | bodyclose | 277 |
17 | gostatus | 242 |
18 | GoCover.io | 226 |
19 | apicompat | 176 |
20 | go-checkstyle | 128 |
21 | lint | 66 |
22 | asty | 65 |
23 | validate | 61 |