From 24f3c93204b14b335d57b8dd42382296d20c7feb Mon Sep 17 00:00:00 2001 From: Paul Wells Date: Tue, 29 Oct 2024 12:16:21 -0700 Subject: [PATCH] ignore unexported fields in yaml lint (#3145) --- pkg/config/configtest/checkyamltag.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/config/configtest/checkyamltag.go b/pkg/config/configtest/checkyamltag.go index a8ee5837..2458a5b9 100644 --- a/pkg/config/configtest/checkyamltag.go +++ b/pkg/config/configtest/checkyamltag.go @@ -31,6 +31,11 @@ func checkYAMLTags(t reflect.Type, seen map[reflect.Type]struct{}) error { for i := 0; i < t.NumField(); i++ { field := t.Field(i) + if !field.IsExported() { + // ignore unexported fields + continue + } + if field.Type.Kind() == reflect.Bool { // ignore boolean fields continue