Staticcheck

 

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 100+ 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. 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.

Staticcheck is open source and offered completely free of charge. Sponsors guarantee its continued development.

Good Stuff

Automated code review

Enrich your team with a reviewer that never sleeps, never tires, and always has a keen eye for code quality!

Editor integration

Staticcheck has got your back, making sure questionable code never leaves your machine.

Constantly evolving

We always strive to find more issues in your code. To that end, we keep constantly improving our tools.

More Good Stuff

Correctness

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.

Simplicity

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.

Maintainability

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.

Advanced editor integration

Any editor can run external tools and display their output, in a weird one-way relationship. But what if your editor and tools communicated? What if your editor offered actionable advice based on tool output? What if it could fix bugs for you? Intelligent editor integration makes this possible.