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
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -26,14 +26,14 @@ linters:
26
26
- revive # Metalinter; drop-in replacement for golint.
27
27
- staticcheck
28
28
- stylecheck # Replacement for golint
29
-
- tenv # Detects using os.Setenv instead of t.Setenv.
30
29
- thelper # Detects test helpers without t.Helper().
31
30
- tparallel # Detects inappropriate usage of t.Parallel().
32
31
- typecheck
33
32
- unconvert # Detects unnecessary type conversions.
34
33
- unparam
35
34
- unused
36
35
- usestdlibvars
36
+
- usetesting # Reports uses of functions with replacement inside the testing package.
37
37
- wastedassign
38
38
39
39
disable:
@@ -42,6 +42,8 @@ linters:
42
42
run:
43
43
# prevent golangci-lint from deducting the go version to lint for through go.mod,
44
44
# which causes it to fallback to go1.17 semantics.
45
+
#
46
+
# TODO(thaJeztah): update "usetesting" settings to enable go1.24 features once our minimum version is go1.24
45
47
go: "1.23.6"
46
48
timeout: 5m
47
49
@@ -111,6 +113,14 @@ linters-settings:
111
113
severity: warning
112
114
disabled: false
113
115
116
+
usetesting:
117
+
# FIXME(thaJeztah): Disable `os.Chdir()` detections; should be automatically disabled on Go < 1.24; see https://github.com/docker/cli/pull/5835#issuecomment-2665302478
118
+
os-chdir: false
119
+
# FIXME(thaJeztah): Disable `context.Background()` detections; should be automatically disabled on Go < 1.24; see https://github.com/docker/cli/pull/5835#issuecomment-2665302478
120
+
context-background: false
121
+
# FIXME(thaJeztah): Disable `context.TODO()` detections; should be automatically disabled on Go < 1.24; see https://github.com/docker/cli/pull/5835#issuecomment-2665302478
122
+
context-todo: false
123
+
114
124
issues:
115
125
# The default exclusion rules are a bit too permissive, so copying the relevant ones below
0 commit comments