You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
synctv/.golangci.yml

134 lines
2.3 KiB
YAML

version: "2"
run:
go: "1.24"
relative-path-mode: gomod
modules-download-mode: readonly
issues:
max-issues-per-linter: 0
max-same-issues: 0
linters:
default: none
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- canonicalheader
- containedctx
- copyloopvar
- durationcheck
- errcheck
- errchkjson
- errname
- errorlint
- exptostd
- fatcontext
- forbidigo
- ginkgolinter
- gocheckcompilerdirectives
- gocritic
- gocyclo
- goprintffuncname
- gosec
- govet
- iface
- importas
- inamedparam
- ineffassign
- intrange
- loggercheck
- mirror
- misspell
- musttag
- nakedret
- noctx
- nolintlint
- nosprintfhostport
- perfsprint
- prealloc
- predeclared
- promlinter
- protogetter
- reassign
- revive
- rowserrcheck
- sloglint
- spancheck
- sqlclosecheck
- staticcheck
- testpackage
- thelper
- tparallel
- unconvert
- unparam
- unused
- usestdlibvars
- usetesting
- wastedassign
- whitespace
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
settings:
copyloopvar:
check-alias: true
cyclop:
max-complexity: 15
errcheck:
check-type-assertions: true
forbidigo:
analyze-types: true
prealloc:
for-loops: true
staticcheck:
dot-import-whitelist: []
http-status-code-whitelist: []
usestdlibvars:
time-month: true
time-layout: true
crypto-hash: true
default-rpc-path: true
sql-isolation-level: true
tls-signature-scheme: true
constant-kind: true
usetesting:
os-temp-dir: true
gosec:
excludes:
- G404
formatters:
enable:
- gci
- gofmt
- gofumpt
- golines
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
settings:
gofmt:
rewrite-rules:
- pattern: "interface{}"
replacement: "any"
- pattern: "a[b:len(a)]"
replacement: "a[b:]"
gofumpt:
extra-rules: true
golines:
shorten-comments: true