Code Analysis

38 projects

Static analysis tools catch bugs and style problems before code runs. The Go toolchain already includes go vet, which reports suspicious constructs, and gofmt, which formats code. This category adds linters with stricter checks, runners that combine many linters, formatters, tools that check architecture rules, and viewers that help you understand Go's syntax trees.

golangci-lint is the standard way to run linters: it bundles dozens of analyzers, runs them in parallel with caching, and is configured through a single YAML file, which makes it easy to use in CI. staticcheck, by Dominik Honnef, is a widely respected set of checks for bugs, simplifications and deprecated APIs, and is also included in golangci-lint and gopls. revive is a configurable successor to the deprecated golint. errcheck finds ignored errors, go-critic adds opinionated checks, and unconvert removes needless type conversions. golines, which shortened long lines, is archived. go-cleanarch checks dependency rules between layers.

Run go vet and staticcheck at minimum. For teams, golangci-lint with a short, agreed set of linters gives consistent results locally and in CI; enabling every linter tends to create noise people learn to ignore. Add govulncheck from the Go team to report known vulnerabilities that your code actually calls.

golangci-lintby golangci

A fast Go linters runner. It runs linters in parallel, uses caching, supports yaml config, has integrations with all major IDE and has dozens of linters included.

github.com/golangci/golangci-lint/v2Go 1.26+ 145 dependenciesv2.15.0updated today

19.5k

staticcheckby dominikh

Staticcheck is go vet on steroids, applying a ton of static analysis checks you might be used to from tools like ReSharper for C#.

honnef.co/go/tools/cmd/staticcheckGo 1.26+ 2026.2.2updated 9d ago

6.9k

reviveby mgechev

~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint.

github.com/mgechev/reviveGo 1.26+ 10 dependenciesv1.17.1updated 6d ago

5.6k

errcheckby kisielk

Errcheck is a program for checking for unchecked errors in Go programs.

github.com/kisielk/errcheckGo 1.26+ 1 dependencyv1.30.0updated 5d ago

2.5k

GoPlantUMLby jfeliu007

Library and CLI that generates text plantump class diagram containing information about structures and interfaces with the relationship among them.

github.com/jfeliu007/goplantumlGo 1.17+ 1 dependencyv1.6.3updated 1y ago

2.1k

go-critic

Source code linter that brings checks that are currently not implemented in other linters.

github.com/go-critic/go-criticGo 1.25+ 14 dependenciesv0.15.0updated 15d ago

2.1k

vacuumby daveshanley

An ultra-super-fast, lightweight OpenAPI linter and quality checking tool.

github.com/daveshanley/vacuumGo 1.27+ 31 dependenciesv0.36.2updated 1d ago

1.1k

golinesby segmentio

Formatter that automatically shortens long lines in Go code.

v0.13.0archived

1.1k

go-cleanarchby roblaszczak

Go-cleanarch was created to validate Clean Architecture rules, like a The Dependency Rule and interaction between packages in your Go projects.

github.com/roblaszczak/go-cleanarchGo 1.11+ No dependencies v1.2.1updated 4y ago

984

php-parserby z7zmey

A Parser for PHP written in Go.

github.com/z7zmey/php-parserGo 1.13+ 3 dependenciesv0.7.2updated 5y ago

958

goast-viewerby yuroyoro

Web based Golang AST visualizer.

github.com/yuroyoro/goast-viewerGo 1.12+ No dependencies updated 2y ago

794

go-mod-outdatedby psampaz

An easy way to find outdated dependencies of your Go projects.

github.com/psampaz/go-mod-outdatedGo 1.18+ 1 dependencyv0.9.0updated 3y ago

669

goreturnsby sqs

Adds zero-value return statements to match the func return types.

github.com/sqs/goreturnsGo 1.14+ 1 dependencyupdated 3y ago

538

todocheckby preslavmihaylov

Static code analyser which links TODO comments in code with issues in your issue tracker.

github.com/preslavmihaylov/todocheckGo 1.21+ 5 dependenciesv0.6.1updated 4mo ago

440

Chronosby amit-davidson

Detects race conditions statically

github.com/amit-davidson/ChronosGo 1.15+ 2 dependenciesupdated 4y ago

438

unconvertby mdempsky

Remove unnecessary type conversions from Go source.

github.com/mdempsky/unconvertGo 1.26+ 2 dependenciesupdated 13d ago

388

wrapcheckby tomarrell

A linter to check that errors from external packages are wrapped.

github.com/tomarrell/wrapcheck/v2Go 1.24+ 5 dependenciesv2.13.0updated 18d ago

373

duplby mibk

Tool for code clone detection.

github.com/mibk/duplGo 1.14+ No dependencies v1.1.0updated 8mo ago

369

tickgitby augmentable-dev

CLI and go package for surfacing code comment TODOs (in any language) and applying a git blameto identify the author.

github.com/augmentable-dev/tickgitGo 1.13+ 7 dependenciesv0.0.14updated 2y ago

324

gostatusby shurcooL

Command line tool, shows the status of repositories that contain Go packages.

github.com/shurcooL/gostatusGo 1.19+ No dependencies updated 1y ago

246

apicompatby bradleyfalzon

Checks recent changes to a Go project for backwards incompatible changes.

updated 9y ago

182

testifylintby Antonboom

A linter that checks usage of github.com/stretchr/testify.

github.com/Antonboom/testifylintGo 1.25+ 1 dependencyv1.6.4updated 1mo ago

173

ast-metrics

Static code analyzer for Go and other languages: complexity, coupling, cohesion and maintainability metrics, with HTML, JSON, Markdown and SARIF reports.

github.com/ast-metrics/ast-metricsGo 1.25+ 25 dependenciesv0.43.1updated 5d ago

165

go-checkstyleby qiniu

Checkstyle is a style check tool like java checkstyle. This tool inspired by java checkstyle, golint. The style referred to some points in Go Code Review Comments.

updated 5y ago

130

astyby asty-org

Converts golang AST to JSON and JSON to AST.

github.com/asty-org/astyGo 1.20+ 1 dependencyupdated 3y ago

88

fatcontextby Crocmagnon

Fatcontext detects nested contexts in loops or function literals.

go.augendre.info/fatcontextGo 1.25+ 1 dependencyv0.10.1updated 1d ago

83

lintby surullabs

Run linters as part of go test.

updated 8y ago

66

ChainJackingby Checkmarx

Find which of your Go lang direct GitHub dependencies is susceptible to ChainJacking attack.

v1.1.2updated 5mo ago

64

gocondenseby abemedia

A gofmt-compatible formatter that condenses multi-line constructs onto single lines where they fit.

github.com/abemedia/gocondenseGo 1.26+ 4 dependenciesv0.4.3updated 19d ago

64

validateby mccoyst

Automatically validates struct fields with tags.

mccoy.space/g/validateGo 1.19+ No dependencies updated 3y ago

62

usestdlibvarsby sashamelentyev

A linter that detect the possibility to use variables/constants from the Go standard library.

github.com/sashamelentyev/usestdlibvarsGo 1.23+ 1 dependencyv1.29.0updated 1y ago

48

sttoby mainak55512

A light-weight superfast line of code counter written in pure Go.

github.com/mainak55512/sttoGo 1.22+ 2 dependenciesv0.1.11updated 11mo ago

47

gomarklintby shinagawa-web

Markdown linter with built-in HTTP link validation, single binary, no Node.js required.

github.com/shinagawa-web/gomarklint/v3Go 1.27+ 3 dependenciesv3.3.2updated today

20

golang-ifood-sdkby arxdsilva

IFood API SDK.

github.com/arxdsilva/golang-ifood-sdkGo 1.17+ 3 dependencies1.1.0updated 4y ago

13

structalignby peczenyj

Shows how a struct's fields could be reordered to use less memory, printing a diff instead of rewriting files.

github.com/peczenyj/structalignGo 1.25+ 6 dependenciesv0.7.1updated 2mo ago

9

deadmonoby arxeiss

Wrapper around deadcode for detection of dead code in Go monorepo.

github.com/arxeiss/deadmonoGo 1.27+ 2 dependenciesv1.1.0updated 17d ago

2
b

blanket

Blanket is a tool that helps you catch functions which don't have direct unit tests in your Go packages.

gitlab.com

goimports

Tool to fix (add, remove) your Go imports automatically.

pkg.go.dev

Esc

Type to search every entry. ↑↓ to move, Enter to open.