aboutsummaryrefslogtreecommitdiffhomepage
path: root/.golangci.yml
diff options
context:
space:
mode:
authorYolan Romailler <[email protected]>2024-01-25 16:24:58 +0100
committerGitHub <[email protected]>2024-01-25 15:24:58 +0000
commit2fe69a828f9fcacc0160a576839d4b67c5730031 (patch)
treefa8b74d9a53d9eab3011f50d710481647b1f0fdd /.golangci.yml
parentc369df5c375685f35f5b9f47f5790124c28258c9 (diff)
downloadcaddy-2fe69a828f9fcacc0160a576839d4b67c5730031.tar.gz
caddy-2fe69a828f9fcacc0160a576839d4b67c5730031.zip
chore: enabling a few more linters (#5961)
Co-authored-by: Francis Lavoie <[email protected]>
Diffstat (limited to '.golangci.yml')
-rw-r--r--.golangci.yml82
1 files changed, 69 insertions, 13 deletions
diff --git a/.golangci.yml b/.golangci.yml
index 5f018970e..d144395db 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -15,35 +15,68 @@ linters-settings:
# If `true`, make the section order the same as the order of `sections`.
# Default: false
custom-order: true
+ exhaustive:
+ ignore-enum-types: reflect.Kind|svc.Cmd
linters:
disable-all: true
enable:
+ - asasalint
+ - asciicheck
+ - bidichk
- bodyclose
+ - decorder
+ - dogsled
+ - dupl
+ - dupword
+ - durationcheck
- errcheck
+ - errname
+ - exhaustive
+ - exportloopref
- gci
+ - gofmt
+ - goimports
- gofumpt
- gosec
- gosimple
- govet
- ineffassign
+ - importas
- misspell
- prealloc
+ - promlinter
+ - sloglint
+ - sqlclosecheck
- staticcheck
+ - tenv
+ - testableexamples
+ - testifylint
+ - tparallel
- typecheck
- unconvert
- unused
+ - wastedassign
+ - whitespace
+ - zerologlint
# these are implicitly disabled:
- # - asciicheck
+ # - containedctx
+ # - contextcheck
+ # - cyclop
# - depguard
- # - dogsled
- # - dupl
- # - exhaustive
- # - exportloopref
+ # - errchkjson
+ # - errorlint
+ # - exhaustruct
+ # - execinquery
+ # - exhaustruct
+ # - forbidigo
+ # - forcetypeassert
# - funlen
- # - gci
+ # - ginkgolinter
+ # - gocheckcompilerdirectives
# - gochecknoglobals
# - gochecknoinits
+ # - gochecksumtype
# - gocognit
# - goconst
# - gocritic
@@ -51,27 +84,47 @@ linters:
# - godot
# - godox
# - goerr113
- # - gofumpt
# - goheader
- # - golint
# - gomnd
+ # - gomoddirectives
# - gomodguard
# - goprintffuncname
- # - interfacer
+ # - gosmopolitan
+ # - grouper
+ # - inamedparam
+ # - interfacebloat
+ # - ireturn
# - lll
- # - maligned
+ # - loggercheck
+ # - maintidx
+ # - makezero
+ # - mirror
+ # - musttag
# - nakedret
# - nestif
+ # - nilerr
+ # - nilnil
# - nlreturn
# - noctx
# - nolintlint
+ # - nonamedreturns
+ # - nosprintfhostport
+ # - paralleltest
+ # - perfsprint
+ # - predeclared
+ # - protogetter
+ # - reassign
+ # - revive
# - rowserrcheck
- # - scopelint
- # - sqlclosecheck
# - stylecheck
+ # - tagalign
+ # - tagliatelle
# - testpackage
+ # - thelper
# - unparam
- # - whitespace
+ # - usestdlibvars
+ # - varnamelen
+ # - wrapcheck
# - wsl
run:
@@ -110,3 +163,6 @@ issues:
text: 'G404' # G404: Insecure random number source (rand)
linters:
- gosec
+ - path: modules/logging/filters.go
+ linters:
+ - dupl