agru/.golangci.yml

145 lines
2.5 KiB
YAML
Raw Normal View History

2023-03-25 15:07:44 +02:00
run:
concurrency: 4
timeout: 30m
issues-exit-code: 1
tests: true
build-tags: []
2023-10-13 23:34:01 +03:00
skip-dirs:
- mocks
2023-03-25 15:07:44 +02:00
skip-dirs-use-default: true
skip-files: []
modules-download-mode: readonly
output:
format: colored-line-number
print-issued-lines: true
print-linter-name: true
sort-results: true
linters-settings:
2023-10-13 23:34:01 +03:00
decorder:
dec-order:
- const
- var
- type
- func
dogsled:
max-blank-identifiers: 3
2023-03-25 15:07:44 +02:00
errcheck:
2023-10-13 23:34:01 +03:00
check-type-assertions: true
2023-03-25 15:07:44 +02:00
check-blank: true
2023-10-13 23:34:01 +03:00
errchkjson:
report-no-exported: true
exhaustive:
check:
- switch
- map
default-signifies-exhaustive: true
2023-03-25 15:07:44 +02:00
gocognit:
min-complexity: 15
nestif:
2023-10-13 23:34:01 +03:00
min-complexity: 5
2023-03-25 15:07:44 +02:00
gocritic:
enabled-tags:
2023-10-13 23:34:01 +03:00
- diagnostic
- style
2023-03-25 15:07:44 +02:00
- performance
2023-10-13 23:34:01 +03:00
gofmt:
simplify: true
rewrite-rules:
- pattern: 'interface{}'
replacement: 'any'
- pattern: 'a[b:len(a)]'
replacement: 'a[b:]'
2023-03-25 15:07:44 +02:00
gofumpt:
2023-10-13 23:34:01 +03:00
extra-rules: true
2023-03-25 15:07:44 +02:00
govet:
check-shadowing: true
2023-10-13 23:34:01 +03:00
grouper:
const-require-single-const: true
import-require-single-import: true
var-require-single-var: true
2023-03-25 15:07:44 +02:00
misspell:
locale: US
2023-10-13 23:34:01 +03:00
usestdlibvars:
time-month: true
time-layout: true
crypto-hash: true
default-rpc-path: true
os-dev-null: true
sql-isolation-level: true
tls-signature-scheme: true
constant-kind: true
2023-03-25 15:07:44 +02:00
unparam:
check-exported: true
linters:
disable-all: false
enable:
2023-10-13 23:34:01 +03:00
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- decorder
- dogsled
- dupl
- dupword
- durationcheck
2023-03-25 15:07:44 +02:00
- errcheck
2023-10-13 23:34:01 +03:00
- errchkjson
- errname
- errorlint
- execinquery
- exhaustive
- exportloopref
- forcetypeassert
- gochecknoinits
2023-03-25 15:07:44 +02:00
- gocognit
2023-10-13 23:34:01 +03:00
- gocritic
- gocyclo
- goerr113
- gofmt
2023-03-25 15:07:44 +02:00
- gofumpt
- goimports
2023-10-13 23:34:01 +03:00
- gosec
2023-03-25 15:07:44 +02:00
- gosimple
2023-10-13 23:34:01 +03:00
- gosmopolitan
2023-03-25 15:07:44 +02:00
- govet
2023-10-13 23:34:01 +03:00
- ineffassign
- makezero
- mirror
2023-03-25 15:07:44 +02:00
- misspell
2023-10-13 23:34:01 +03:00
- nestif
- nolintlint
- prealloc
- predeclared
- revive
- sqlclosecheck
2023-03-25 15:07:44 +02:00
- staticcheck
2023-10-13 23:34:01 +03:00
- unconvert
2023-03-25 15:07:44 +02:00
- unparam
- unused
2023-10-13 23:34:01 +03:00
- usestdlibvars
- wastedassign
2023-03-25 15:07:44 +02:00
fast: false
issues:
exclude-rules:
- path: _test\.go
linters:
- gocyclo
- gocognit
- errcheck
- dupl
- gosec
- linters:
- staticcheck
text: "SA9003:"
- linters:
- lll
source: "^//go:generate "
max-issues-per-linter: 0
max-same-issues: 0
new: false