From bffa751303d06dc5c2ab7a4b7af1c68e43a190b7 Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Tue, 12 Nov 2024 10:54:42 +0100 Subject: [PATCH] golangci-lint: disable type assertion checks in errcheck linter --- internal/golangcilint/golangci_lint.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/golangcilint/golangci_lint.go b/internal/golangcilint/golangci_lint.go index 91b6171..c663e0b 100644 --- a/internal/golangcilint/golangci_lint.go +++ b/internal/golangcilint/golangci_lint.go @@ -63,8 +63,10 @@ linters-settings: errcheck: # Report about assignment of errors to blank identifier. check-blank: true - # Report about not checking of errors in type assertions. - check-type-assertions: true + # Do not report about not checking of errors in type assertions. + # This is not as dangerous as skipping error values because an unchecked type assertion just immediately panics. + # We disable this because it makes a ton of useless noise esp. in test code. + check-type-assertions: false {{- if .ErrcheckExcludes }} exclude-functions: {{- range .ErrcheckExcludes }}