Skip to content

Commit

Permalink
chore: add a better golangci-lint configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Feb 26, 2024
1 parent cf96618 commit ddbe115
Showing 1 changed file with 66 additions and 26 deletions.
92 changes: 66 additions & 26 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,79 @@ linters-settings:
locale: "US"

linters:
enable-all: true
disable:
- stylecheck
- gosec
- dupl
- maligned
- depguard
- lll
- prealloc
- scopelint
- gocritic
- gochecknoinits
- gochecknoglobals
- godox
- funlen
- wsl
- whitespace
- gomnd
- typecheck
- godot
- errname
- nlreturn
- wrapcheck
disable-all: false
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- decorder
- dogsled
- dupword
- durationcheck
- errcheck
- errchkjson
- errorlint
- exportloopref
- forcetypeassert
- ginkgolinter
- gocheckcompilerdirectives
- gocognit
- goconst
- gocyclo
- gofmt
- gofumpt
- goheader
- goimports
- gomoddirectives
- gomodguard
- goprintffuncname
- gosimple
- govet
- importas
- inamedparam
- ineffassign
- ireturn
- loggercheck
- makezero
- mirror
- misspell
- nakedret
- nolintlint
- nonamedreturns
- nosprintfhostport
- perfsprint
- predeclared
- reassign
- revive
- staticcheck
- tagalign
- tenv
- testableexamples
- testifylint
- thelper
- unconvert
- unparam
- unused
- usestdlibvars
- wastedassign

issues:
exclude-use-default: true
max-issues-per-linter: 0
max-same-issues: 0
# The following excludes are considered false-positives/known-OK.
exclude:
- fmt.Sprintf can be replaced with string
exclude-rules:
- path: ca([/|\\])ca.go
- path: ca/ca.go
text: 'type name will be used as ca.CAImpl by other packages, and that stutters; consider calling this Impl'
- path: va([/|\\])va.go
- path: va/va.go
text: 'type name will be used as va.VAImpl by other packages, and that stutters; consider calling this Impl'
- path: wfe([/|\\])wfe.go
- path: wfe/wfe.go
text: 'if` block ends with a `return` statement, so drop this `else` and outdent its block'
- path: va/va.go
linters:
- goconst
text: 'string `Incorrect validation certificate for %s challenge. ` has \d occurrences, make it a constant'

0 comments on commit ddbe115

Please sign in to comment.