diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8278d17b8b..82178dcdf9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -26,7 +26,7 @@ jobs: - uses: golangci/golangci-lint-action@v6 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.51 + version: v1.59 args: --timeout 10m github-token: ${{ secrets.GITHUB_TOKEN }} if: env.GIT_DIFF diff --git a/.golangci.yml b/.golangci.yml index 17d5384ea3..3829eaeef3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -5,8 +5,6 @@ linters: disable-all: true enable: - bodyclose - - deadcode - - depguard - dogsled - errcheck - goconst @@ -23,14 +21,15 @@ linters: - prealloc - exportloopref - staticcheck - - structcheck - stylecheck - typecheck - unconvert - unused - - varcheck issues: + exclude-dirs: # following upstream rules + - x/wasm + - app exclude-rules: - text: "Use of weak random number generator" linters: @@ -46,12 +45,6 @@ linters-settings: # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; # default is false: such cases aren't reported by default. check-blank: true - maligned: - # print struct with more effective memory layout or not, false by default - suggest-new: true - golint: - # minimal confidence for issues, default is 0.8 - min-confidence: 0 prealloc: # XXX: we don't recommend using this linter before doing performance profiling. # For most programs usage of prealloc will be a premature optimization. diff --git a/cmd/contract_tests/main.go b/cmd/contract_tests/main.go index 4f27b03387..bf03e02012 100644 --- a/cmd/contract_tests/main.go +++ b/cmd/contract_tests/main.go @@ -11,31 +11,31 @@ func main() { // This must be compiled beforehand and given to dredd as parameter, in the meantime the server should be running h := hooks.NewHooks() server := hooks.NewServer(hooks.NewHooksRunner(h)) - h.BeforeAll(func(t []*transaction.Transaction) { + h.BeforeAll(func(_ []*transaction.Transaction) { fmt.Println("Sleep 5 seconds before all modification") }) - h.BeforeEach(func(t *transaction.Transaction) { + h.BeforeEach(func(_ *transaction.Transaction) { fmt.Println("before each modification") }) - h.Before("/version > GET", func(t *transaction.Transaction) { + h.Before("/version > GET", func(_ *transaction.Transaction) { fmt.Println("before version TEST") }) - h.Before("/node_version > GET", func(t *transaction.Transaction) { + h.Before("/node_version > GET", func(_ *transaction.Transaction) { fmt.Println("before node_version TEST") }) - h.BeforeEachValidation(func(t *transaction.Transaction) { + h.BeforeEachValidation(func(_ *transaction.Transaction) { fmt.Println("before each validation modification") }) - h.BeforeValidation("/node_version > GET", func(t *transaction.Transaction) { + h.BeforeValidation("/node_version > GET", func(_ *transaction.Transaction) { fmt.Println("before validation node_version TEST") }) - h.After("/node_version > GET", func(t *transaction.Transaction) { + h.After("/node_version > GET", func(_ *transaction.Transaction) { fmt.Println("after node_version TEST") }) - h.AfterEach(func(t *transaction.Transaction) { + h.AfterEach(func(_ *transaction.Transaction) { fmt.Println("after each modification") }) - h.AfterAll(func(t []*transaction.Transaction) { + h.AfterAll(func(_ []*transaction.Transaction) { fmt.Println("after all modification") }) server.Serve()