Lint & Formatters¶
Resources¶
Articles¶
- Cleaner go code with golines
- A Complete Guide to Linting Go Programs
- How to add a private linter to golangci-lint
- Sort Go Imports
- Setting up VS Code for Golang (2021)
Libraries¶
- golangci/golangci-lint - Fast linters Runner for Go
- mvdan/gofumpt - A stricter gofmt
- go-critic/go-critic - The most opinionated Go source code linter for code audit.
- incu6us/goimports-reviser - Right imports sorting & code formatting tool (goimports alternative)
- segmentio/golines - A golang formatter that fixes long lines
- TekWizely/pre-commit-golang - Pre-commit hooks for Golang with support for monorepos, the ability to pass arguments and environment variables to all hooks, and the ability to invoke custom go tools.
- kisielk/errcheck - errcheck checks that you checked errors.
- dominikh/go-tools - Staticcheck - The advanced Go linter
- mgechev/revive - ~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint
- daixiang0/gci - GCI, a tool that control golang package import order and make it always deterministic.
Samples¶
- Golden config for golangci-lint
- golangci/example-plugin-linter - example linter that can be used as a plugin for github.com/golangci/golangci-lint