Staticcheck is a state of the art linter for the Go programming language. Using static analysis, it finds bugs and performance issues, offers simplifications, and enforces style rules.
Each of the 150+ checks has been designed to be fast, precise and useful. When Staticcheck flags code, you can be sure that it isn’t wasting your time with unactionable warnings. Unlike many other linters, Staticcheck focuses on checks that produce few to no false positives. It’s the ideal candidate for running in CI without risking spurious failures.
Staticcheck aims to be trivial to adopt. It behaves just like the official go tool and requires no learning to get started with. Just run staticcheck ./… on your code in addition to go vet ./….
While checks have been designed to be useful out of the box, they still provide configuration where necessary, to fine-tune to your needs, without overwhelming you with hundreds of options.
Staticcheck can be used from the command line, in CI, and even directly from your editor.
This is free and open source software.
Website: github.com/dominikh/go-tools
Support:
Developer: Dominik Honnef
License: MIT License

Staticcheck is written in Go. Learn Go with our recommended free books and free tutorials.
Related Software
| Go Linters | |
|---|---|
| revive | Designed as a drop-in replacement for golint |
| golangci-lint | Fast Go linters runner |
| gosec | Security scanner for Go projects |
| Staticcheck | Advanced Go linter |
| go-critic | Opinionated Go source code linter |
| Vet | Examines Go source code and reports suspicious constructs |
| gofumpt | Stricter gofmt |
| gofmt | Formats Go programs |
| go-ruleguard | Analysis-based Go linter that runs dynamically loaded rules |
| forbidigo | Go linter for forbidding identifiers |
| godot | Keep source code comments consistent |
Read our verdict in the software roundup.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |

