From 256b3ed2dbb45e1a37b5525641730bba16b3b28a Mon Sep 17 00:00:00 2001 From: Robin Olsen <129996395+Telikz@users.noreply.github.com> Date: Thu, 19 Mar 2026 19:49:34 +0100 Subject: [PATCH] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- internal/utils/check/expect.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/utils/check/expect.go b/internal/utils/check/expect.go index eba9385..fdb410f 100644 --- a/internal/utils/check/expect.go +++ b/internal/utils/check/expect.go @@ -111,11 +111,11 @@ func (e *Expector) NotNil(value any, message string) *Expector { func (e *Expector) Contains(s, substr, message string) *Expector { if !strings.Contains(s, substr) { return e.Fail(fmt.Sprintf(`%s expected to contain "%v", but it does not.`, message, substr)) - } else { - return e.Pass(fmt.Sprintf(`%s contains "%v"`, message, substr)) } + return e.Pass(fmt.Sprintf(`%s contains "%v"`, message, substr)) } + func (e *Expector) NotContains(s, substr, message string) *Expector { check := NewCheck(message, !strings.Contains(s, substr)) e.Checks = append(e.Checks, check)