Add some new linters.

This commit is contained in:
jholdstock 2022-03-17 15:55:24 +00:00 committed by Jamie Holdstock
parent 2d67a35ba5
commit 9fa1012f3d
2 changed files with 15 additions and 2 deletions

View File

@ -5,16 +5,29 @@ linters:
disable-all: true
enable:
- asciicheck
- bidichk
- deadcode
- durationcheck
- errcheck
- errchkjson
- errname
- exhaustive
- exportloopref
- goconst
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- misspell
- nilerr
- revive
- staticcheck
- structcheck
- tparallel
- typecheck
- unconvert
- unparam
- unused
- varcheck
- vetshadow

View File

@ -72,11 +72,11 @@ func TestMain(m *testing.M) {
ctx, cancel := context.WithCancel(context.Background())
err = database.CreateNew(testDb, feeXPub)
if err != nil {
panic(fmt.Errorf("error creating test database: %v", err))
panic(fmt.Errorf("error creating test database: %w", err))
}
db, err = database.Open(ctx, &wg, testDb, time.Hour, maxVoteChangeRecords)
if err != nil {
panic(fmt.Errorf("error opening test database: %v", err))
panic(fmt.Errorf("error opening test database: %w", err))
}
// Run tests.