From 2f1cb2f116b449a34579776f093127e3024110ee Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 6 May 2024 11:18:52 +0200 Subject: [PATCH] chore: remove/upgrade deprecated linters (#19) --- golangci-lint-limited/.golangci.yml | 16 +++++----------- golangci-lint/.golangci.yml | 17 +++++------------ 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/golangci-lint-limited/.golangci.yml b/golangci-lint-limited/.golangci.yml index 3c3c0b5..a9d33ea 100644 --- a/golangci-lint-limited/.golangci.yml +++ b/golangci-lint-limited/.golangci.yml @@ -7,20 +7,15 @@ linters-settings: funlen: lines: 100 statements: 50 - gci: - local-prefixes: github.com/golangci/golangci-lint # goconst: # min-len: 2 # min-occurrences: 2 gocyclo: min-complexity: 10 - gomnd: - settings: - mnd: - # don't include the "operation" and "assign" - checks: [argument, case, condition, return] + mnd: + # don't include the "operation" and "assign" + checks: [argument, case, condition, return] govet: - check-shadowing: true settings: printf: funcs: @@ -41,7 +36,6 @@ linters: disable-all: true enable: - bodyclose - - deadcode - dogsled - dupl - errcheck @@ -52,11 +46,11 @@ linters: - gocritic - gocyclo - gocognit - - goerr113 + - err113 - errorlint - gofmt - goimports - - gomnd + - mnd - goprintffuncname - gosec - gosimple diff --git a/golangci-lint/.golangci.yml b/golangci-lint/.golangci.yml index 51b8150..ebcadbc 100644 --- a/golangci-lint/.golangci.yml +++ b/golangci-lint/.golangci.yml @@ -14,17 +14,12 @@ linters-settings: funlen: lines: 100 statements: 50 - gci: - local-prefixes: github.com/golangci/golangci-lint gocyclo: min-complexity: 10 - gomnd: - settings: - mnd: - # don't include the "operation" and "assign" - checks: [argument, case, condition, return] + mnd: + # don't include the "operation" and "assign" + checks: [argument, case, condition, return] govet: - check-shadowing: true settings: printf: funcs: @@ -58,7 +53,6 @@ linters: - containedctx - contextcheck - cyclop - - deadcode # We currently don't want to keep a list of allowed dependencies. # - depguard - dogsled @@ -67,7 +61,6 @@ linters: - errcheck - errname - errorlint - - execinquery - exhaustive # Initializing structs with all fields is nonsense. # - exhaustruct @@ -86,12 +79,12 @@ linters: - godot # TODOs are fine. #- godox - - goerr113 + - err113 - gofmt - gofumpt - goheader - goimports - - gomnd + - mnd # We need replacement to "fix" vulnerability issues. # - gomoddirectives - gomodguard