From ed40833b3023e961dba7d01625f8b0054ab1cb2e Mon Sep 17 00:00:00 2001 From: William Murphy Date: Wed, 1 May 2024 12:59:35 -0400 Subject: [PATCH] chore: enable go-critic deferInLoop lint (#2825) The goal here is to be more careful about leaking file handles and other resources. Signed-off-by: Will Murphy --- .golangci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.golangci.yaml b/.golangci.yaml index 39a9e2e3d28..efe5fa2ec85 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -49,6 +49,9 @@ linters-settings: # If lower than 0, disable the check. # Default: 40 statements: 50 + gocritic: + enabled-checks: + - deferInLoop output: uniq-by-line: false run: