diff --git a/.golangci/step1.yml b/.golangci/step1.yml index f010992710cdd248ffa65d7004e4a1ed7998420c..7179e3daff5d467d0cfb774537535bbf6e3eabcd 100644 --- a/.golangci/step1.yml +++ b/.golangci/step1.yml @@ -2,20 +2,25 @@ run: deadline: 10m linters: + disable-all: true enable: - errcheck - goconst - gofmt -# - golint + - golint - interfacer - disable-all: true - linters-settings: golint: - min-confidence: 1 + min-confidence: 0 goconst: min-len: 2 min-occurrences: 2 gofmt: - auto-fix: false \ No newline at end of file + auto-fix: false + +issues: + exclude-rules: + - linters: + - golint + text: "should be" diff --git a/.golangci/step2.yml b/.golangci/step2.yml index 41110baf959e58f4884705d3a3a92af17fefaca1..838ba3bd9e913c6c5f63ef2ad34f5a950a807be9 100644 --- a/.golangci/step2.yml +++ b/.golangci/step2.yml @@ -2,12 +2,13 @@ run: deadline: 10m linters: + disable-all: true enable: - govet - structcheck - stylecheck - - disable-all: true + - staticcheck + - goerr113 linters-settings: govet: @@ -15,4 +16,11 @@ linters-settings: issues: exclude: - - composites \ No newline at end of file + - composites + exclude-rules: + - linters: + - goerr113 + text: "do not define dynamic errors" + - linters: + - stylecheck + text: "(should be|should have name of the form)" diff --git a/.golangci/step3.yml b/.golangci/step3.yml index 612278fb2c2eab459a7059cdcf50ee8cbb9f5b6c..732b53992d55c43d172121ac3a3e24c92db8abcb 100644 --- a/.golangci/step3.yml +++ b/.golangci/step3.yml @@ -2,6 +2,7 @@ run: deadline: 10m linters: + disable-all: true enable: - unconvert - unparam @@ -10,5 +11,4 @@ linters: - nakedret - prealloc - deadcode - - disable-all: true \ No newline at end of file + - gosimple diff --git a/.golangci/step4.yml b/.golangci/step4.yml index 6514c8df82e1babb1be75e1da4784610facede2d..f926a891f7c0ec7375590072e09890ca842b501a 100644 --- a/.golangci/step4.yml +++ b/.golangci/step4.yml @@ -2,11 +2,19 @@ run: deadline: 10m linters: + disable-all: true enable: - gosec - ineffassign - depguard - typecheck - - megacheck + - unused + - misspell - disable-all: true +issues: + exclude-rules: + # Exclude some linters from running on tests files. + - path: _test\.go + linters: + - gosec + - unused diff --git a/cmd/state/stateless/stateless.go b/cmd/state/stateless/stateless.go index 5087ff877e1b9b8f7892a932bf6afeafcd7b4763..5c5cd292eea9a949156c645c68a3630d4f47b6ef 100644 --- a/cmd/state/stateless/stateless.go +++ b/cmd/state/stateless/stateless.go @@ -65,7 +65,7 @@ func runBlock(ibs *state.IntraBlockState, txnWriter state.StateWriter, blockWrit ctx := chainConfig.WithEIPsFlags(context.Background(), header.Number) if err := ibs.CommitBlock(ctx, blockWriter); err != nil { - return nil, fmt.Errorf("commiting block %d failed: %v", block.NumberU64(), err) + return nil, fmt.Errorf("committing block %d failed: %v", block.NumberU64(), err) } return receipts, nil }