mirror of
https://github.com/go-gitea/gitea
synced 2025-12-07 13:28:25 +00:00
update golangci-lint to v2.7.0 (#36079)
- Update and autofix most issues - Corrected variable names to `cutOk` - Impossible condition in `services/migrations/onedev_test.go` removed - `modules/setting/config_env.go:128:3` looks like a false-positive, added nolint
This commit is contained in:
@@ -238,8 +238,8 @@ func TestCommitStringParsing(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.testName, func(t *testing.T) {
|
||||
testString := fmt.Sprintf("%s%s", dataFirstPart, test.commitMessage)
|
||||
idx := strings.Index(testString, "DATA:")
|
||||
commit, err := NewCommit(0, 0, []byte(testString[idx+5:]))
|
||||
_, after, _ := strings.Cut(testString, "DATA:")
|
||||
commit, err := NewCommit(0, 0, []byte(after))
|
||||
if err != nil && test.shouldPass {
|
||||
t.Errorf("Could not parse %s", testString)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user