Files
compose/.golangci.yml
David Gageot 04b4a832dc chore(lint): add forbidigo rules to enforce t.Context() in tests
Add linter rules to prevent usage of context.Background() and
context.TODO() in test files - t.Context() should be used instead.

The rules only apply to *_test.go files, not production code.

Note: os.Setenv is not covered by forbidigo due to a limitation where
it only catches calls when the return value is assigned. However,
errcheck will flag unchecked os.Setenv calls.

Assisted-By: cagent
Signed-off-by: David Gageot <david.gageot@docker.com>
2026-01-20 11:34:11 +01:00

2.5 KiB