From daf5aa00e3f9ad1af5461d8962c0efc967db7de3 Mon Sep 17 00:00:00 2001 From: ffranr Date: Tue, 24 Jan 2023 16:17:25 +0000 Subject: [PATCH] lint: disable new sub-linters to match pre-upgrade This change ensures that the majority of the codebase still passes the newly upgraded linter. --- .golangci.yml | 50 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index a4a52f6..e2bba6c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -15,24 +15,34 @@ linters-settings: simplify: true linters: - enable-all: true - disable: - # Init functions are used by loggers throughout the codebase. - - gochecknoinits - # Global variables are used by loggers. - - gochecknoglobals - - # Some lines are over 80 characters on purpose and we don't want to make - # them even longer by marking them as 'nolint'. - - lll - - # We don't care (enough) about misaligned structs to lint that. - - maligned - - # We have long functions, especially in tests. Moving or renaming those - # would trigger funlen problems that we may not want to solve at that time. - - funlen - - # Gosec is outdated and reports false positives. - - gosec \ No newline at end of file + # Specify an enabled list of linters rather than a disabled list because + # the latest linter includes many sub-linters which do not pass the codebase. + enable: + - bodyclose + - deadcode + - depguard + - dupl + - errcheck + - goconst + - gocritic + - gocyclo + - gofmt + - goimports + - golint + - gosimple + - govet + - ineffassign + - interfacer + - misspell + - nakedret + - prealloc + - scopelint + - staticcheck + - structcheck + - stylecheck + - typecheck + - unconvert + - unparam + - unused + - varcheck \ No newline at end of file