Add some new linters.
This commit is contained in:
parent
2d67a35ba5
commit
9fa1012f3d
@ -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
|
||||||
|
|||||||
@ -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.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user