-
Notifications
You must be signed in to change notification settings - Fork 4
/
.golangci.yml
36 lines (36 loc) · 2.75 KB
/
.golangci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
linters:
disable-all: true
enable:
# - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
- gosimple # Linter for Go source code that specializes in simplifying a code
#- exhaustive # check exhaustiveness of enum switch statements
#- funlen # Tool for detection of long functions
#- gocognit # Computes and checks the cognitive complexity of functions
#- gocritic # The most opinionated Go source code linter
#- godot # Check if comments end in a period
#- golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
#- gosec # Inspects source code for security problems
#- lll # Reports long lines
#- misspell # Finds commonly misspelled English words in comments
#- scopelint # Scopelint checks for unpinned variables in go programs
#- unused # Checks Go code for unused constants, variables, functions and types
#- whitespace # Tool for detection of leading and trailing whitespace
# - depguard # Go linter that checks if package imports are in a list of acceptable packages
- bodyclose # checks whether HTTP response body is closed successfully
- dupl # Tool for code clone detection
- exportloopref # checks for pointers to enclosing loop variables
- goconst # Finds repeated strings that could be replaced by a constant
- gocyclo # Computes and checks the cyclomatic complexity of functions
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
- goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
- ineffassign # Detects when assignments to existing variables are not used
- nakedret # Finds naked returns in functions greater than a specified function length
- noctx # noctx finds sending http request without context.Context
- prealloc # Finds slice declarations that could potentially be preallocated
- rowserrcheck # checks whether Err of rows is checked successfully
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
- stylecheck # Stylecheck is a replacement for golint
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
- unconvert # Remove unnecessary type conversions
- unparam # Reports unused function parameters