Skip to content

Commit 65eeab2

Browse files
committed
chore: enable testifylint
Signed-off-by: Matthieu MOREL <[email protected]>
1 parent 64b4268 commit 65eeab2

25 files changed

+1337
-2491
lines changed

.golangci.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@ linters:
1010
- govet
1111
- ineffassign
1212
- staticcheck
13+
- testifylint
1314
- unused
1415
linters-settings: # please keep this alphabetized
1516
goimports:
1617
local-prefixes: go.etcd.io # Put imports beginning with prefix after 3rd-party packages.
18+
testifylint:
19+
disable:
20+
- go-require
21+
enable-all: true
22+
formatter:
23+
require-f-funcs: true

allocate_test.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ package bbolt
33
import (
44
"testing"
55

6+
"github.com/stretchr/testify/require"
7+
68
"go.etcd.io/bbolt/internal/common"
79
"go.etcd.io/bbolt/internal/freelist"
810
)
@@ -26,9 +28,8 @@ func TestTx_allocatePageStats(t *testing.T) {
2628
prePageCnt := txStats.GetPageCount()
2729
allocateCnt := f.FreeCount()
2830

29-
if _, err := tx.allocate(allocateCnt); err != nil {
30-
t.Fatal(err)
31-
}
31+
_, err := tx.allocate(allocateCnt)
32+
require.NoError(t, err)
3233

3334
txStats = tx.Stats()
3435
if txStats.GetPageCount() != prePageCnt+int64(allocateCnt) {

0 commit comments

Comments
 (0)