Skip to content

Commit 0763fe2

Browse files
committed
style(golangci-lint): fix warnings
1 parent c7a6fce commit 0763fe2

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

.golangci.yml

+4-9
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,13 @@
22
run:
33
modules-download-mode: mod
44

5-
skip-dirs: [vendor]
6-
75
linters-settings:
86

97
gosec:
108
excludes:
119
- G307
1210

1311
staticcheck:
14-
# Select the Go version to target. The default is '1.13'.
15-
go: "1.20"
1612
# https://staticcheck.io/docs/options#checks
1713
checks: [ "all" ]
1814

@@ -49,7 +45,7 @@ linters-settings:
4945
gocyclo:
5046
min-complexity: 20 # minimal code cyclomatic complexity to report
5147

52-
gomnd:
48+
mnd:
5349
settings:
5450
mnd:
5551
# don't include the "operation" and "assign"
@@ -148,8 +144,8 @@ linters:
148144
- bodyclose # Detects whether the HTTP response body is closed successfully, not closing the response body could lead to memory leaks
149145
- goconst # Finds repeated strings that could be replaced by a constant
150146
- godot # Check if comments end in a period
151-
- gomnd # An analyzer to detect magic numbers.
152-
- goerr113 # Golang linter to check the errors handling expressions
147+
- mnd # An analyzer to detect magic numbers.
148+
- err113 # Golang linter to check the errors handling expressions
153149
- gocritic # Provides many diagnostics that check for bugs, performance and style issues.
154150
- exhaustive # Check exhaustiveness of enum switch statements
155151
- exportloopref # checks for pointers to enclosing loop variables -- VERY IMPORTANT TO USE
@@ -178,7 +174,7 @@ linters:
178174
- wsl # Whitespace Linter - Forces you to use empty lines!
179175
- usestdlibvars # A linter that detect the possibility to use variables/constants from the Go standard library.
180176
- interfacebloat # A linter that checks the number of methods inside an interface.
181-
- logrlint # Check logr arguments.
177+
- loggercheck # Check logr arguments.
182178
- reassign # Checks that package variables are not reassigne
183179
- musttag # linter that enforces field tags in (un)marshaled structslinter that enforces field tags in (un)marshaled structs
184180
- dupword # checks for duplicate words in the source code comments.
@@ -208,7 +204,6 @@ issues:
208204
- goerr113
209205
- path: mock
210206
linters:
211-
- gomnd
212207
- revive
213208
- gocyclo
214209
- errcheck

0 commit comments

Comments
 (0)