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
SPDX-FileCopyrightText: Copyright {{ YEAR }} The {{ AUTHOR }} Authors
76
+
SPDX-License-Identifier: BSD-3-Clause
55
77
goimports:
56
-
local-prefixes: go.lsp.dev/protocol,go.lsp.dev
57
-
golint:
58
-
min-confidence: 0.3
78
+
local-prefixes: go.lsp.dev/protocol
79
+
gosimple:
80
+
go: 1.16
59
81
govet:
60
82
enable-all: true
61
83
check-shadowing: true
62
84
disable:
63
-
- fieldalignment # TODO(zchee)
64
-
depguard:
65
-
list-type: blacklist
66
-
include-go-root: true
67
-
# packages-with-error-message:
68
-
# - github.com/sirupsen/logrus: "logging is allowed only by logutils.Log"
85
+
- fieldalignment
86
+
importas:
87
+
alias: []
88
+
no-unaliased: true
69
89
lll:
70
90
line-length: 120
71
91
tab-width: 1
72
-
maligned:
73
-
suggest-new: true
74
92
misspell:
75
93
locale: US
76
94
ignore-words:
77
95
- cancelled
78
96
- cancelling
79
97
nakedret:
80
98
max-func-lines: 30
99
+
nestif:
100
+
min-complexity: 4
81
101
prealloc:
82
102
simple: true
83
103
range-loops: true
84
104
for-loops: true
105
+
staticcheck:
106
+
go: 1.16
85
107
testpackage:
86
108
skip-regexp: '.*(export)_test\.go'
87
109
unparam:
88
110
check-exported: true
89
111
algo: cha
90
112
unused:
91
-
check-exported: false
113
+
go: 1.16
92
114
whitespace:
93
115
multi-if: true
94
116
multi-func: true
95
117
96
118
linters:
97
119
fast: false
98
120
disabled:
99
-
- exhaustivestruct # Checks if all struct's fields are initialized
100
-
- forbidigo # Forbids identifiers
101
-
- gci# Gci control golang package import order and make it always deterministic
102
-
- gochecknoglobals # check that no global variables exist
103
-
- gochecknoinits# Checks that no init functions are present in Go code
104
-
- gocyclo#Computes and checks the cyclomatic complexity of functions
105
-
- godox# Tool for detection of FIXME, TODO and other comment keywords
106
-
- goerr113# Golang linter to check the errors handling expressions
107
-
- gofumpt# Gofumpt checks whether code was gofumpt-ed
108
-
- goheader# Checks is file header matches to pattern
109
-
- gomnd # An analyzer to detect magic numbers
110
-
- gomodguard# Allow and block list linter for direct Go module dependencies
111
-
- gosec# Inspects source code for security problems
112
-
- lll#Reports long lines
113
-
- nlreturn# nlreturn checks for a new line before return and branch statements to increase code clarity
114
-
- paralleltest# TODO(zchee): paralleltest detects missing usage of t.Parallel() method in your Go test
115
-
- scopelint# Scopelint checks for unpinned variables in go programs
116
-
- sqlclosecheck# Checks that sql.Rows and sql.Stmt are closed
117
-
- testpackage# TODO(zchee): linter that makes you use a separate _test package
118
-
- thelper# thelper detects golang test helpers without t.Helper() call and checks the consistency of test helpers
119
-
- tparallel # tparallel detects inappropriate usage of t.Parallel() method in your Go test codes
120
-
- wrapcheck # TODO(zchee): enable: Checks that errors returned from external packages are wrapped
121
-
- wsl # Whitespace Linter
121
+
- exhaustivestruct # Checks if all struct's fields are initialized
122
+
- forbidigo # Forbids identifiers
123
+
- forcetypeassert# finds forced type assertions
124
+
- gci # Gci control golang package import order and make it always deterministic.
125
+
- gochecknoglobals# check that no global variables exist
126
+
- gochecknoinits#Checks that no init functions are present in Go code
127
+
- goconst# Finds repeated strings that could be replaced by a constant
128
+
- godox# Tool for detection of FIXME, TODO and other comment keywords
129
+
- goerr113# Golang linter to check the errors handling expressions
130
+
- golint# Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
131
+
- gomnd # An analyzer to detect magic numbers.
132
+
- gomoddirectives# Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod.
133
+
- gomodguard# Allow and block list linter for direct Go module dependencies.
134
+
- interfacer#Linter that suggests narrower interface types
135
+
- lll# Reports long lines
136
+
- maligned# Tool to detect Go structs that would take less memory if their fields were sorted
137
+
- promlinter# Check Prometheus metrics naming via promlint
138
+
- scopelint# Scopelint checks for unpinned variables in go programs
139
+
- sqlclosecheck# Checks that sql.Rows and sql.Stmt are closed.
140
+
- testpackage# TODO(zchee): enable: # linter that makes you use a separate _test package
141
+
- tparallel # tparallel detects inappropriate usage of t.Parallel() method in your Go test codes
142
+
- wrapcheck # TODO(zchee): enable: # Checks that errors returned from external packages are wrapped
143
+
- wsl # Whitespace Linter
122
144
enable:
123
-
- asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
124
-
- bodyclose # checks whether HTTP response body is closed successfully
125
-
- deadcode # Finds unused code
126
-
- depguard # Go linter that checks if package imports are in a list of acceptable packages
127
-
- dogsled # Checks assignments with too many blank identifiers
128
-
- dupl # Tool for code clone detection
129
-
- errcheck # Errcheck is a program for checking for unchecked errors in go programs
130
-
- 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
131
-
- exhaustive # check exhaustiveness of enum switch statements
132
-
- exportloopref # checks for pointers to enclosing loop variables
133
-
- funlen # Tool for detection of long functions
134
-
- gocognit # Computes and checks the cognitive complexity of functions
135
-
- goconst # Finds repeated strings that could be replaced by a constant
136
-
- gocritic # The most opinionated Go source code linter
137
-
- godot # Check if comments end in a period
138
-
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
139
-
- goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
140
-
- golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
141
-
- goprintffuncname # Checks that printf-like functions are named with `f` at the end
142
-
- gosimple # Linter for Go source code that specializes in simplifying a code
143
-
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
144
-
- ifshort # Checks that your code uses short syntax for if-statements whenever possible
145
-
- ineffassign # Detects when assignments to existing variables are not used
146
-
- makezero # Finds slice declarations with non-zero initial length
147
-
- misspell # Finds commonly misspelled English words in comments
148
-
- nakedret # Finds naked returns in functions greater than a specified function length
149
-
- nestif # Reports deeply nested if statements
150
-
- noctx # noctx finds sending http request without context.Context
151
-
- nolintlint # Reports ill-formed or insufficient nolint directives
152
-
- prealloc # Finds slice declarations that could potentially be preallocated
153
-
- predeclared # find code that shadows one of Go's predeclared identifiers
154
-
- rowserrcheck # checks whether Err of rows is checked successfully
155
-
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
156
-
- structcheck # Finds unused struct fields
157
-
- stylecheck # Stylecheck is a replacement for golint
158
-
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
159
-
- unconvert # Remove unnecessary type conversions
160
-
- unparam # Reports unused function parameters
161
-
- unused # Checks Go code for unused constants, variables, functions and types
162
-
- varcheck # Finds unused global variables and constants
163
-
- whitespace # Tool for detection of leading and trailing whitespace
145
+
- asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
146
+
- bodyclose # checks whether HTTP response body is closed successfully
147
+
- cyclop # checks function and package cyclomatic complexity
148
+
- deadcode # Finds unused code
149
+
- depguard # Go linter that checks if package imports are in a list of acceptable packages
150
+
- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
151
+
- dupl # Tool for code clone detection
152
+
- durationcheck # check for two durations multiplied together
153
+
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
154
+
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
155
+
- exhaustive # check exhaustiveness of enum switch statements
156
+
- exportloopref # checks for pointers to enclosing loop variables
157
+
- funlen # Tool for detection of long functions
158
+
- gocognit # Computes and checks the cognitive complexity of functions
159
+
- gocritic # Provides many diagnostics that check for bugs, performance and style issues.
160
+
- gocyclo # Computes and checks the cyclomatic complexity of functions
161
+
- godot # Check if comments end in a period
162
+
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
163
+
- gofumpt # Gofumpt checks whether code was gofumpt-ed.
164
+
- goheader # Checks is file header matches to pattern
165
+
- goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
166
+
- goprintffuncname # Checks that printf-like functions are named with `f` at the end
167
+
- gosec # Inspects source code for security problems
168
+
- gosimple # Linter for Go source code that specializes in simplifying a code
169
+
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
170
+
- ifshort # Checks that your code uses short syntax for if-statements whenever possible
171
+
- importas # Enforces consistent import aliases
172
+
- ineffassign # Detects when assignments to existing variables are not used
173
+
- makezero # Finds slice declarations with non-zero initial length
174
+
- misspell # Finds commonly misspelled English words in comments
175
+
- nakedret # Finds naked returns in functions greater than a specified function length
176
+
- nestif # Reports deeply nested if statements
177
+
- nilerr # Finds the code that returns nil even if it checks that the error is not nil.
178
+
- nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity
179
+
- noctx # noctx finds sending http request without context.Context
180
+
- nolintlint # Reports ill-formed or insufficient nolint directives
181
+
- paralleltest # paralleltest detects missing usage of t.Parallel() method in your Go test
182
+
- prealloc # Finds slice declarations that could potentially be preallocated
183
+
- predeclared # find code that shadows one of Go's predeclared identifiers
184
+
- revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint.
185
+
- rowserrcheck # checks whether Err of rows is checked successfully
186
+
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
187
+
- structcheck # Finds unused struct fields
188
+
- stylecheck # Stylecheck is a replacement for golint
189
+
- tagliatelle # Checks the struct tags.
190
+
- thelper # thelper detects golang test helpers without t.Helper() call and checks the consistency of test helpers
191
+
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
192
+
- unconvert # Remove unnecessary type conversions
193
+
- unparam # Reports unused function parameters
194
+
- unused # Checks Go code for unused constants, variables, functions and types
195
+
- varcheck # Finds unused global variables and constants
0 commit comments