Fix linting issues

This commit is contained in:
Gusted 2024-08-14 11:43:42 +02:00
parent 674689af4a
commit fe18428806
No known key found for this signature in database
GPG key ID: FD821B732837125F
34 changed files with 64 additions and 69 deletions

View file

@ -4,7 +4,6 @@
package git
import (
"fmt"
"testing"
"github.com/stretchr/testify/assert"
@ -65,14 +64,6 @@ func TestBranchRuleMatch(t *testing.T) {
for _, kase := range kases {
pb := ProtectedBranch{RuleName: kase.Rule}
var should, infact string
if !kase.ExpectedMatch {
should = " not"
} else {
infact = " not"
}
assert.EqualValues(t, kase.ExpectedMatch, pb.Match(kase.BranchName),
fmt.Sprintf("%s should%s match %s but it is%s", kase.BranchName, should, kase.Rule, infact),
)
assert.EqualValues(t, kase.ExpectedMatch, pb.Match(kase.BranchName), "%s - %s", kase.BranchName, kase.Rule)
}
}