From 0d2ad0ee43d24c76ca2a0a481543bad42f7f5790 Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Sun, 29 Sep 2024 11:45:21 +0200 Subject: [PATCH] fix: clean up testifylint configuration in golangci-lint Signed-off-by: Matthieu MOREL --- hack/golangci-hints.yaml | 2 -- hack/golangci.yaml | 5 ----- hack/golangci.yaml.in | 11 ++++------- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/hack/golangci-hints.yaml b/hack/golangci-hints.yaml index 4aa49842c20..58b382f0b2c 100644 --- a/hack/golangci-hints.yaml +++ b/hack/golangci-hints.yaml @@ -185,5 +185,3 @@ linters-settings: # please keep this alphabetized - "all" testifylint: enable-all: true - disable: # TODO: remove each disabled rule and fix it - - require-error diff --git a/hack/golangci.yaml b/hack/golangci.yaml index 5ffff1570a9..9c3a960a8c1 100644 --- a/hack/golangci.yaml +++ b/hack/golangci.yaml @@ -239,11 +239,6 @@ linters-settings: # please keep this alphabetized testifylint: enable-all: true disable: # TODO: remove each disabled rule and fix it - - compares - - error-is-as - - error-nil - - expected-actual - float-compare - go-require - - nil-compare - require-error diff --git a/hack/golangci.yaml.in b/hack/golangci.yaml.in index a09d17c4ad0..2501fdf0831 100644 --- a/hack/golangci.yaml.in +++ b/hack/golangci.yaml.in @@ -210,14 +210,11 @@ linters-settings: # please keep this alphabetized {{- end}} testifylint: enable-all: true + {{- if not .Hints }} disable: # TODO: remove each disabled rule and fix it - {{- if .Base}} - - compares - - error-is-as - - error-nil - - expected-actual + {{- if .Base }} - float-compare - go-require - - nil-compare - {{- end}} + {{- end}} - require-error + {{- end}}