From 4ba3bebf4b011cf6bb04ff30d025a48d14ecac4a Mon Sep 17 00:00:00 2001 From: Sven Greb Date: Fri, 30 Oct 2020 21:41:32 +0100 Subject: [PATCH] Update to golangci-lint v1.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The currently latest `golangci-lint` version 1.32.0 [1] introduced new linters that have been added to this template: 1. wrapcheck [2] — Checks that errors returned from external packages are wrapped. This linter is disabled by default, but has been enabled for this template to help tp reduce error context loss. 2. [errorlint][3] — Helps to make more efficient use of the error wrapping scheme introduced in Go 1.13. This linter is disabled by default, but has been enabled for this template to help to use Go's new error handling concept. 3. [tparallel][4] — Detects inappropriate usage of `t.Parallel()` method in Go tests. This linter is disabled by default, but has been enabled for this template to help to prevent parallelism errors in tests. [1]: https://github.com/golangci/golangci-lint/releases/tag/v1.32.0 [2]: https://github.com/tomarrell/wrapcheck [3]: https://github.com/polyfloyd/go-errorlint [4]: https://github.com/moricho/tparallel GH-20 --- .github/workflows/ci.yml | 2 +- .golangci.yml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7d7706..beab393 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,7 @@ jobs: # See https://github.com/golangci/golangci-lint-action for more details. uses: golangci/golangci-lint-action@v2 with: - version: v1.31 + version: v1.32 test: strategy: matrix: diff --git a/.golangci.yml b/.golangci.yml index 72f1cdb..989f083 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -32,6 +32,7 @@ linters: - dogsled - dupl - errcheck + - errorlint - exhaustive - gochecknoinits - goconst @@ -59,12 +60,14 @@ linters: - staticcheck - structcheck - stylecheck + - tparallel - typecheck - unconvert - unparam - unused - varcheck - whitespace + - wrapcheck # Run all linters, not only fast ones. fast: false @@ -145,4 +148,4 @@ run: deadline: 15m service: - golangci-lint-version: 1.31.x + golangci-lint-version: 1.32.x