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
+9-18Lines changed: 9 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,6 @@ linters-settings:
6
6
min-occurrences: 2
7
7
gocyclo:
8
8
min-complexity: 15
9
-
govet:
10
-
check-shadowing: true
11
-
maligned:
12
-
suggest-new: true
13
9
misspell:
14
10
locale: US
15
11
ignore-words:
@@ -23,12 +19,15 @@ linters-settings:
23
19
- name: blank-imports
24
20
- name: context-as-argument
25
21
- name: context-keys-type
22
+
- name: defer
26
23
- name: dot-imports
27
24
- name: error-return
28
25
- name: error-strings
29
26
- name: error-naming
27
+
- name: early-return
30
28
- name: errorf
31
29
- name: exported
30
+
- name: import-shadowing
32
31
- name: indent-error-flow
33
32
- name: if-return
34
33
- name: increment-decrement
@@ -52,23 +51,22 @@ linters-settings:
52
51
- name: constant-logical-expr
53
52
- name: confusing-naming
54
53
- name: unnecessary-stmt
55
-
- name: imports-blacklist
54
+
- name: use-any
55
+
- name: imports-blocklist
56
56
arguments:
57
57
- "github.com/pkg/errors"
58
58
gci:
59
59
sections:
60
60
- standard
61
61
- default
62
-
section-separators:
63
-
- newLine
64
62
linters:
65
63
disable-all: true
66
64
enable:
67
65
- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f()) [fast: true, auto-fix: false]
68
66
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases [fast: false, auto-fix: false]
69
67
- errorlint # Errorlint is a linter that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
- exportloopref#checks for pointers to enclosing loop variables [fast: false, auto-fix: false]
69
+
- copyloopvar#copyloopvar is a linter detects places where loop variables are copied. Replaces exportloopref since Go1.22
72
70
- gci # Gci controls golang package import order and makes it always deterministic. [fast: true, auto-fix: false]
73
71
- gochecknoinits # Checks that no init functions are present in Go code [fast: true, auto-fix: false]
74
72
- goconst # Finds repeated strings that could be replaced by a constant [fast: true, auto-fix: false]
@@ -77,7 +75,7 @@ linters:
77
75
- godot # Check if comments end in a period [fast: true, auto-fix: true]
78
76
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification [fast: true, auto-fix: true]
79
77
- goimports # In addition to fixing imports, goimports also formats your code in the same style as gofmt. [fast: true, auto-fix: true]
80
-
- gomnd# An analyzer to detect magic numbers. [fast: true, auto-fix: false]
78
+
- mnd# An analyzer to detect magic numbers. [fast: true, auto-fix: false]
81
79
- goprintffuncname # Checks that printf-like functions are named with `f` at the end [fast: true, auto-fix: false]
- gosimple # (megacheck) Linter for Go source code that specializes in simplifying code [fast: false, auto-fix: false]
@@ -94,7 +92,7 @@ linters:
94
92
- rowserrcheck # checks whether Err of rows is checked successfully [fast: false, auto-fix: false]
95
93
- staticcheck # (megacheck) It's a set of rules from staticcheck. It's not the same thing as the staticcheck binary. The author of staticcheck doesn't support or approve the use of staticcheck as a library inside golangci-lint. [fast: false, auto-fix: false]
96
94
- stylecheck # Stylecheck is a replacement for golint [fast: false, auto-fix: false]
97
-
- tenv#tenv is analyzer that detects using os.Setenv instead of t.Setenv since Go1.17 [fast: false, auto-fix: false]
95
+
- usetesting#Reports uses of functions with replacement inside the testing package. [auto-fix]
0 commit comments