GolangCI detects and comments issues in GitHub pull requests: bugs, style violations, anti-pattern instances.
Automated Code Fixes
Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.
Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases.
Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes.
Staticcheck is go vet on steroids, applying a ton of static analysis checks.
The most opinionated Go source code linter.
Checks Go code for unused constants, variables, functions and types.
Linter for Go source code that specialises on simplifying code.
Inspects source code for security problems.
Finds unused struct fields.
Finds unused global variables and constants.
Linter that suggests narrower interface types.
Remove unnecessary type conversions.
Detects when assignments to existing variables are not used.
Finds repeated strings that could be replaced by a constant.
Finds unused code.
Gofmt checks whether code was gofmt-ed. We run this tool with -s option to check for code simplification.
Goimports does everything that gofmt does. Additionally it checks unused imports.
Checks whether HTTP response body is closed successfully.
Checks that no globals are present in Go code.
Checks that no init functions are present in Go code.
Finds commonly misspelled English words in comments.
Finds naked returns in functions greater than a specified function length.
Finds slice declarations that could potentially be preallocated.
Scopelint checks for unpinned variables in go programs.
Reports long lines.
Tool to detect Go structs that would take less memory if their fields were sorted.
Tool for code clone detection.
Computes and checks the cyclomatic complexity of functions.
Like the front-end of a Go compiler, parses and type-checks Go code.
Reports unused function parameters.
Go linter that checks if package imports are in a list of acceptable packages.