From 5b61251115148bfaadd3b9607b84dd184d59667f Mon Sep 17 00:00:00 2001 From: Robin Hahling Date: Mon, 28 Mar 2022 22:34:49 +0200 Subject: [PATCH] ci: enable more golangci-lint checkers, update config for Go 1.18 Commit 3f5cb13ba7dd12398c07192996e4fcaaa8bc3d68 updated CI for Go 1.18 as well as the version of golangci-lint. However, it omitted updating the golangci-lint configuration to default for Go 1.18 instead of Go 1.17. This commit does this and also enables more checkers. Signed-off-by: Robin Hahling --- .golangci.yml | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index d54cd24..ded7058 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -5,8 +5,13 @@ linters: disable-all: true enable: - asciicheck + - bidichk + - bodyclose + - containedctx + - cyclop - deadcode - dogsled + - dupl - durationcheck - errcheck - errname @@ -14,39 +19,52 @@ linters: - exhaustive - exportloopref - forcetypeassert + - gocognit + - goconst + - gocritic - godot - goerr113 - gofmt - goimports + - gomnd - gosec - gosimple - govet + - grouper - ifshort - ineffassign + - ireturn + - makezero - misspell - nestif - nilerr + - nilnil - prealloc - predeclared - revive - rowserrcheck - staticcheck - structcheck + - tenv - thelper + - tparallel - typecheck - unconvert - unparam - unused - varcheck + - wastedassign linters-settings: + cyclop: + skip-tests: true gosimple: - go: "1.17" + go: "1.18" govet: enable-all: true staticcheck: - go: "1.17" + go: "1.18" stylecheck: - go: "1.17" + go: "1.18" unused: - go: "1.17" + go: "1.18"