You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .golangci.yml
+53-51Lines changed: 53 additions & 51 deletions
Original file line number
Diff line number
Diff line change
@@ -96,69 +96,71 @@ linters:
96
96
disabled:
97
97
- exhaustivestruct # Checks if all struct's fields are initialized
98
98
- forbidigo # Forbids identifiers
99
-
- gci # Gci control golang package import order and make it always deterministic.
99
+
- gci # Gci control golang package import order and make it always deterministic
100
100
- gochecknoglobals # check that no global variables exist
101
101
- gochecknoinits # Checks that no init functions are present in Go code
102
102
- godox # Tool for detection of FIXME, TODO and other comment keywords
103
103
- goerr113 # Golang linter to check the errors handling expressions
104
-
- gofumpt # Gofumpt checks whether code was gofumpt-ed.
104
+
- gofumpt # Gofumpt checks whether code was gofumpt-ed
105
105
- goheader # Checks is file header matches to pattern
106
-
- gomnd # An analyzer to detect magic numbers.
107
-
- gomodguard # Allow and block list linter for direct Go module dependencies.
106
+
- gomnd # An analyzer to detect magic numbers
107
+
- gomodguard # Allow and block list linter for direct Go module dependencies
108
108
- gosec # Inspects source code for security problems
109
109
- nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity
110
110
- paralleltest # paralleltest detects missing usage of t.Parallel() method in your Go test
111
111
- scopelint # Scopelint checks for unpinned variables in go programs
112
-
- sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
113
-
- testpackage
112
+
- sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed
114
113
- wsl # Whitespace Linter
115
114
enable:
116
-
- asciicheck
117
-
- bodyclose
118
-
- deadcode
119
-
- depguard
120
-
- dogsled
121
-
- dupl
122
-
- errcheck
123
-
- errorlint
124
-
- exhaustive
125
-
- exportloopref
126
-
- funlen
127
-
- gocognit
128
-
- goconst
129
-
- gocritic
130
-
- gocyclo
131
-
- godot
132
-
- gofmt
133
-
- goimports
134
-
- golint
135
-
- goprintffuncname
136
-
- gosimple
137
-
- govet
138
-
- ineffassign
139
-
- interfacer
115
+
- asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
116
+
- bodyclose # checks whether HTTP response body is closed successfully
117
+
- deadcode # Finds unused code
118
+
- depguard # Go linter that checks if package imports are in a list of acceptable packages
119
+
- dogsled # Checks assignments with too many blank identifiers
120
+
- dupl # Tool for code clone detection
121
+
- errcheck # Errcheck is a program for checking for unchecked errors in go programs
122
+
- errorlint # source code linter for Go software that can be used to find code that will cause problemswith the error wrapping scheme introduced in Go 1.13
123
+
- exhaustive # check exhaustiveness of enum switch statements
124
+
- exportloopref # checks for pointers to enclosing loop variables
125
+
- funlen # Tool for detection of long functions
126
+
- gocognit # Computes and checks the cognitive complexity of functions
127
+
- goconst # Finds repeated strings that could be replaced by a constant
128
+
- gocritic # The most opinionated Go source code linter
129
+
- gocyclo # Computes and checks the cyclomatic complexity of functions
130
+
- godot # Check if comments end in a period
131
+
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
132
+
- goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
133
+
- golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
134
+
- goprintffuncname # Checks that printf-like functions are named with `f` at the end
135
+
- gosimple # Linter for Go source code that specializes in simplifying a code
136
+
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
137
+
- ifshort # Checks that your code uses short syntax for if-statements whenever possible
138
+
- ineffassign # Detects when assignments to existing variables are not used
139
+
- interfacer # Linter that suggests narrower interface types
140
140
- lll # Reports long lines
141
-
- makezero
142
-
- maligned
143
-
- misspell
144
-
- nakedret
145
-
- nestif
146
-
- noctx
147
-
- nolintlint
148
-
- prealloc
149
-
- rowserrcheck
150
-
- staticcheck
151
-
- structcheck
152
-
- stylecheck
153
-
- thelper
154
-
- tparallel
155
-
- typecheck
156
-
- unconvert
157
-
- unparam
158
-
- unused
159
-
- varcheck
160
-
- whitespace
161
-
- wrapcheck
141
+
- makezero # Finds slice declarations with non-zero initial length
142
+
- maligned # Tool to detect Go structs that would take less memory if their fields were sorted
143
+
- misspell # Finds commonly misspelled English words in comments
144
+
- nakedret # Finds naked returns in functions greater than a specified function length
145
+
- nestif # Reports deeply nested if statements
146
+
- noctx # noctx finds sending http request without context.Context
147
+
- nolintlint # Reports ill-formed or insufficient nolint directives
148
+
- prealloc # Finds slice declarations that could potentially be preallocated
149
+
- predeclared # find code that shadows one of Go's predeclared identifiers
150
+
- rowserrcheck # checks whether Err of rows is checked successfully
151
+
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
152
+
- structcheck # Finds unused struct fields
153
+
- stylecheck # Stylecheck is a replacement for golint
154
+
- testpackage # linter that makes you use a separate _test package
155
+
- thelper # thelper detects golang test helpers without t.Helper() call and checks the consistency of test helpers
156
+
- tparallel # tparallel detects inappropriate usage of t.Parallel() method in your Go test codes
157
+
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
158
+
- unconvert # Remove unnecessary type conversions
159
+
- unparam # Reports unused function parameters
160
+
- unused # Checks Go code for unused constants, variables, functions and types
161
+
- varcheck # Finds unused global variables and constants
162
+
- whitespace # Tool for detection of leading and trailing whitespace
163
+
- wrapcheck # Checks that errors returned from external packages are wrapped
0 commit comments