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 disable-all: true
enable: enable:
- asciicheck - asciicheck
- bidichk
- deadcode - deadcode
- durationcheck
- errcheck - errcheck
- errchkjson
- errname
- exhaustive
- exportloopref
- goconst
- gofmt - gofmt
- goimports - goimports
- gosimple - gosimple
- govet - govet
- ineffassign - ineffassign
- misspell - misspell
- nilerr
- revive - revive
- staticcheck
- structcheck - structcheck
- tparallel
- typecheck
- unconvert - unconvert
- unparam - unparam
- unused - unused
- varcheck
- vetshadow

View File

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