From 335a5212a6dcb12989c72df64a9514e68927fdbe Mon Sep 17 00:00:00 2001 From: Dustin Decker Date: Thu, 28 Apr 2022 13:33:51 -0700 Subject: [PATCH] invert logic for sonarcloud (#487) --- pkg/detectors/sonarcloud/sonarcloud.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/detectors/sonarcloud/sonarcloud.go b/pkg/detectors/sonarcloud/sonarcloud.go index 253bf61b9de9..61f3964af2df 100644 --- a/pkg/detectors/sonarcloud/sonarcloud.go +++ b/pkg/detectors/sonarcloud/sonarcloud.go @@ -60,13 +60,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } bodyString := string(bodyBytes) - validResponse := strings.Contains(bodyString, `"valid":false`) + validResponse := strings.Contains(bodyString, `"valid":true`) defer res.Body.Close() if res.StatusCode >= 200 && res.StatusCode < 300 { if validResponse { - s1.Verified = false - } else { s1.Verified = true } } else {