registry/.golangci.yml
adam jones 60c75b6591
Disable ireturn linter rule (#307)
## Summary

- Disable the `ireturn` linter rule in golangci-lint configuration
- Remove all related `nolint:ireturn` comments from the codebase

The `ireturn` rule was flagging factory functions that intentionally
return interfaces for dependency injection, which is a common and valid
Go pattern. Since this pattern is used extensively throughout the
codebase for good architectural reasons, it makes sense to disable this
rule entirely.

It also seems buggy, and seems to conflict with other lint rules -
causing unnecessary toil.See:
https://stackoverflow.com/questions/72385337/golang-linter-always-complains
2025-08-26 15:16:43 +01:00

79 lines
1.3 KiB
YAML

version: "2"
run:
modules-download-mode: readonly
linters:
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- contextcheck
- cyclop
- dupl
- durationcheck
- errname
- errorlint
- exhaustive
- forbidigo
- gocognit
- goconst
- gocritic
- gocyclo
- godox
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- grouper
- importas
- makezero
- misspell
- nakedret
- nestif
- nilerr
- nilnil
- noctx
- nolintlint
- nosprintfhostport
- predeclared
- promlinter
- reassign
- revive
- rowserrcheck
- sqlclosecheck
- testpackage
- thelper
- tparallel
- unconvert
- unparam
- usestdlibvars
- wastedassign
- whitespace
settings:
cyclop:
max-complexity: 20
dupl:
threshold: 300
gocognit:
min-complexity: 51
nestif:
min-complexity: 10
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$