Skip to content

Commit a718475

Browse files
authored
CI: enable linter "containedctx" (#3529)
1 parent f735457 commit a718475

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.golangci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ linters:
280280
# Recommended? (requires some work)
281281
#
282282

283-
- containedctx # containedctx is a linter that detects struct contained context.Context field
284283
- errname # Checks that sentinel errors are prefixed with the `Err` and error types are suffixed with the `Error`.
285284
- ireturn # Accept Interfaces, Return Concrete Types
286285
- mnd # An analyzer to detect magic numbers.
@@ -503,3 +502,8 @@ issues:
503502
- usetesting
504503
path: "pkg/apiserver/(.+)_test.go"
505504
text: "os.CreateTemp.* could be replaced by os.CreateTemp.*"
505+
506+
- linters:
507+
- containedctx
508+
path: "cmd/notification-file/main.go"
509+
text: "found a struct that contains a context.Context field"

0 commit comments

Comments
 (0)