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.
Code obviously has to be correct. Unfortunately, it never is. Some code is more correct than other, but there’ll always be bugs. Tests catch some, your peers catch others, and Staticcheck catches some more.
After correctness comes simplicity. There are many ways to skin a cat (but please don’t), but some are unnecessarily elaborate. Staticcheck helps you replace complex code with simple code.
Code is a living thing. If it’s not maintained regularly, it will become stale and unreliable. It won’t catch up when its dependencies move on or guidelines change. Staticcheck is like a sitter for your code for when you don’t have time.
More than 150 checks ensure that your code is in tip-top shape.
Staticcheck can easily be integrated with your code review and CI systems, preventing buggy code from ever getting committed.
Staticcheck is part of most major Go editors and has been integrated with gopls, finding bugs and offering automatic fixes.