Go Code Analysis

Open-source Go projects categorized as Code Analysis

Top 23 Go Code Analysis Projects

  • golangci-lint

    Fast linters Runner for Go

    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.

    [1]: https://golangci-lint.run/usage/linters/

  • goimports

    [mirror] Go Tools (by golang)

    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

    Project mention: revive v1.3.4 is now available | /r/golang | 2023-09-18

    The v1.3.4 of revive, the fast, configurable, extensible, flexible, and beautiful linter for Go, is available.

  • errcheck

    errcheck checks that you checked errors.

    Project mention: Linter to check for errors ignored with _ | /r/golang | 2023-11-05

    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?

  • GoPlantUML

    PlantUML Class Diagram Generator for golang projects

  • PHP-Parser

    PHP parser written in Go (by z7zmey)

  • 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.

  • golines

    A golang formatter that fixes long lines

  • 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

  • Chronos

    Chronos - A static race detector for the go language (by amit-davidson)

  • todocheck

    A static code analyser for annotated TODO comments

  • unconvert

    Remove unnecessary type conversions from Go source

  • dupl

    a tool for code clone detection

  • tickgit

    Manage your repository's TODOs, tickets and checklists as config in your codebase.

  • 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
  • gostatus

    A command line tool that shows the status of Go repositories.

  • GoCover.io

    GoCover.io offers the code coverage of any golang package as a service.

    Project mention: GitHub code coverage badge | /r/golang | 2023-01-27

    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.

  • apicompat

    apicompat checks recent changes to a Go project for backwards incompatible changes

  • go-checkstyle

    checkstyle for go (by qiniu)

  • lint

    Run linters from Go code - (by surullabs)

  • asty

    Converts golang AST to JSON and JSON to AST

  • validate

    A Go package to automatically validate fields with tags (by mccoyst)

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-11-29.

Go Code Analysis related posts

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
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com