enable go-required check

Signed-off-by: xin.li <xin.li@daocloud.io>
This commit is contained in:
xin.li 2025-02-23 16:54:43 +08:00
parent bc4ae15d77
commit d92c70b826
3 changed files with 1 additions and 3 deletions

View File

@ -277,5 +277,4 @@ linters-settings: # please keep this alphabetized
enable-all: true
disable: # TODO: remove each disabled rule and fix it
- float-compare
- go-require
- require-error

View File

@ -242,7 +242,6 @@ linters-settings: # please keep this alphabetized
disable: # TODO: remove each disabled rule and fix it
{{- if .Base }}
- float-compare
- go-require
{{- end}}
- require-error
{{- end}}

View File

@ -291,7 +291,7 @@ func TestInformerNeverStarts(t *testing.T) {
go func() {
defer wg.Done()
stopReason := myController.Run(testContext)
if !errors.Is(stopReason, context.Canceled) {
if !errors.Is(stopReason, context.DeadlineExceeded) {
t.Errorf("expected error to be context.Canceled, but got: %v", stopReason)
}
}()