yay/.golangci.yml

102 lines
1.9 KiB
YAML
Raw Normal View History

linters-settings:
dupl:
threshold: 100
funlen:
lines: 100
statements: 50
goconst:
min-len: 3
min-occurrences: 4
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
gocyclo:
min-complexity: 15
goimports:
2021-09-08 22:28:08 +02:00
local-prefixes: github.com/Jguer/yay/v11
gomnd:
2022-11-15 16:22:57 +01:00
checks:
- argument
- case
- condition
- return
ignored-numbers:
- '0'
- '1'
- '2'
- '3'
ignored-functions:
- strings.SplitN
govet:
check-shadowing: true
lll:
line-length: 140
misspell:
locale: US
2022-11-15 16:22:57 +01:00
nolintlint:
allow-unused: false # report any unused nolint directives
require-explanation: false # don't require an explanation for nolint directives
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
linters:
# please, do not use `enable-all`: it's deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
enable:
- bodyclose
- depguard
2022-11-15 16:22:57 +01:00
- dogsled
- dupl
- errcheck
2022-11-15 16:22:57 +01:00
- exportloopref
# - funlen # TOFIX
- gochecknoinits
2022-11-15 16:22:57 +01:00
# - goconst # TOFIX
- gocritic
2022-11-15 16:22:57 +01:00
# - gocyclo # TOFIX
- gofmt
- goimports
2022-11-15 16:22:57 +01:00
# - gomnd # TOFIX
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
2022-11-15 16:22:57 +01:00
- noctx
- nolintlint
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- whitespace
2021-08-11 20:13:28 +02:00
run:
2022-11-15 15:17:56 +01:00
go: '1.18'
issues:
exclude-rules:
- path: _test\.go
linters:
2021-08-11 20:13:28 +02:00
- lll
- revive
- wsl
- govet
- godot
- errcheck
- stylecheck
- dupl
- gocritic
- gochecknoinits
exclude:
- G204