1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-07-12 22:21:40 +02:00

Enable gocritic and don't ignore globally (#3159)

Use `nolint` directives instead.

From #2960
This commit is contained in:
qwerty287
2024-01-10 15:34:44 +01:00
committed by GitHub
parent aef3f8f3ef
commit 12c40eb957
34 changed files with 170 additions and 161 deletions

View File

@ -303,7 +303,8 @@ func TestFifoErrorsMultiThread(t *testing.T) {
case got := <-obtainedWorkCh:
fmt.Println(got.ID)
if !task1Processed {
switch {
case !task1Processed:
if got != task1 {
t.Errorf("expect task1 returned from queue as task2 and task3 depends on it")
return
@ -317,7 +318,7 @@ func TestFifoErrorsMultiThread(t *testing.T) {
obtainedWorkCh <- got
}
}()
} else if !task2Processed {
case !task2Processed:
if got != task2 {
t.Errorf("expect task2 returned from queue")
return
@ -331,7 +332,7 @@ func TestFifoErrorsMultiThread(t *testing.T) {
obtainedWorkCh <- got
}
}()
} else {
default:
if got != task3 {
t.Errorf("expect task3 returned from queue")
return