From 02ac9628cc74c6823a0f0f7d6d7146b0a32b81f4 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 19 Jun 2024 15:18:48 -0400 Subject: [PATCH] golangci.yml: add rule to not run errcheck on test Test files have some calls that don't necessarily get checked since they have a very low probability to fail, and in a testing environment it's acceptable to not have bulletproof code. Therefore, we add a rule to not run that check on any file that ends with `_test.go` (Go test convention), so the linter isn't as noisy as it used to be. --- .golangci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index d62815ea5..19eb72b53 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -20,6 +20,9 @@ issues: - linters: - lll source: "^//go:generate " + - linters: + - errcheck + path: ".*_test.go" # Maximum issues count per one linter. Set to 0 to disable. Default is 50. max-issues-per-linter: 0