0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-16 21:56:37 -05:00
zot/golangcilint.yaml
Ramkumar Chinchani db888fa385
chore: fix dependabot alerts (#2664)
https://github.com/project-zot/zot/pull/2660

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2024-09-19 23:50:08 -07:00

94 lines
1.7 KiB
YAML

run:
timeout: 60m
linters:
enable-all: true
disable:
- gomnd
- funlen
- gocognit
- paralleltest
- forbidigo
- ireturn
- wrapcheck
- exhaustive
- maintidx
- exhaustruct
- rowserrcheck
- sqlclosecheck
- revive
- musttag
- depguard
- execinquery
- inamedparam
- intrange
- promlinter
- protogetter
- contextcheck # needs to revisit: https://github.com/project-zot/zot/pull/2556
- copyloopvar # needs to revisit: https://github.com/project-zot/zot/pull/2556
- typecheck
linters-settings:
dupl:
threshold: 200
nestif:
min-complexity: 26
cyclop:
max-complexity: 40
skip-tests: true
varnamelen:
check-return: true
ignore-type-assert-ok: true
ignore-map-index-ok: true
ignore-chan-recv-ok: true
ignore-names:
- err
- ok
- gc
- wg
ignore-decls:
- n int
- i int
- r *os.File
- w *os.File
- to int64
- l *ldap.Conn
- w http.ResponseWriter
- r *http.Request
gci:
sections:
- standard
- default
- prefix(zotregistry.dev/zot)
wsl:
allow-assign-and-anything: true
force-err-cuddling: true
nolintlint:
allow-unused: true
mnd:
checks:
- argument
- case
- condition
- operation
- return
- assign
ignored-numbers:
- "10"
- "64"
gomoddirectives:
replace-allow-list:
- github.com/gorilla/mux
- github.com/testcontainers/testcontainers-go
issues:
exclude-dirs:
- "internal"
exclude-rules:
- path: pkg/extensions/search/schema.resolvers.go
linters:
- lll
- varnamelen
- gci
- path: _test\.go
linters:
- dupl