From e94f6d0dd9a5e5738dca6bce03c4b1207ffbc0ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 1 Jun 2024 13:31:11 +0300 Subject: [PATCH] Address golangci-lint deprecation warnings, enable some more linters (#2152) * Address golangci-lint linter deprecation warnings 1.59.0 outputs: WARN [lintersdb] The name "gas" is deprecated. The linter has been renamed to: gosec. WARN [lintersdb] The linter named "megacheck" is deprecated. It has been split into: gosimple, staticcheck, unused. * Enable some more linters, address finding --- .golangci.yml | 12 +++++------- command.go | 1 - 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 7b6d3021..2c8f4808 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -26,28 +26,26 @@ linters: - errcheck #- exhaustive #- funlen - - gas #- gochecknoinits - goconst - gocritic #- gocyclo - #- gofmt + - gofmt - goimports #- gomnd #- goprintffuncname - #- gosec + - gosec - gosimple - govet - ineffassign #- lll - - megacheck - #- misspell + - misspell #- nakedret #- noctx - #- nolintlint + - nolintlint #- rowserrcheck #- scopelint - #- staticcheck + - staticcheck #- structcheck ! deprecated since v1.49.0; replaced by 'unused' - stylecheck #- typecheck diff --git a/command.go b/command.go index b31e22c8..54748fc6 100644 --- a/command.go +++ b/command.go @@ -1460,7 +1460,6 @@ func (c *Command) UseLine() string { // DebugFlags used to determine which flags have been assigned to which commands // and which persist. -// nolint:goconst func (c *Command) DebugFlags() { c.Println("DebugFlags called on", c.Name()) var debugflags func(*Command)