Update golangci config

This commit is contained in:
Arnie 2025-12-15 22:21:58 +01:00
parent 0af7547c4b
commit bd632f21ef
Signed by: arnie
GPG Key ID: 59315333892F43F4

View File

@ -1,52 +1,10 @@
linters-settings: version: "2"
errcheck:
check-type-assertions: true run:
gci: timeout: 3m
sections: relative-path-mode: gitroot
- standard
- default
- prefix(go.c3c.cz)
forbidigo:
analyze-types: true
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
- hugeParam
- paramTypeCombine
- sloppyReassign
govet:
enable-all: true
settings:
shadow:
strict: true
nolintlint:
require-explanation: true
require-specific: true
sloglint:
attr-only: true
context: scope
forbidden-keys:
- time
- level
- msg
- source
key-naming-case: snake
no-global: all
static-msg: true
stylecheck:
checks:
- all
- -ST1000
wsl:
allow-cuddle-declarations: true
linters: linters:
disable-all: true
enable: enable:
- bidichk - bidichk
- bodyclose - bodyclose
@ -56,14 +14,11 @@ linters:
- errorlint - errorlint
- exhaustive - exhaustive
- forbidigo - forbidigo
- gci
- gocheckcompilerdirectives - gocheckcompilerdirectives
- gochecksumtype - gochecksumtype
- goconst - goconst
- gocritic - gocritic
- gofumpt
- gosec - gosec
- gosimple
- govet - govet
- ineffassign - ineffassign
- makezero - makezero
@ -77,11 +32,9 @@ linters:
- perfsprint - perfsprint
- prealloc - prealloc
- predeclared - predeclared
- protogetter
- sloglint - sloglint
- spancheck - spancheck
- staticcheck - staticcheck
- stylecheck
- unconvert - unconvert
- unconvert - unconvert
- unparam - unparam
@ -90,11 +43,81 @@ linters:
- usestdlibvars - usestdlibvars
- wastedassign - wastedassign
- whitespace - whitespace
- wsl - wsl_v5
settings:
errcheck:
check-type-assertions: true
forbidigo:
analyze-types: true
gocritic:
disabled-checks:
- hugeParam
- paramTypeCombine
- sloppyReassign
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
govet:
enable:
- shadow
nolintlint:
require-explanation: true
require-specific: true
sloglint:
attr-only: true
no-global: all
context: scope
static-msg: true
key-naming-case: snake
forbidden-keys:
- time
- level
- msg
- source
staticcheck:
checks:
- all
- -ST1000
wsl_v5:
disable:
- decl
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
- gofumpt
settings:
gci:
sections:
- standard
- default
- prefix(go.yrps.dev)
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
issues: issues:
max-issues-per-linter: 0 max-issues-per-linter: 0
max-same-issues: 0 max-same-issues: 0
exclude-use-default: false
exclude: output:
- Error return value of .*\.Body\.Close. is not checked sort-order:
- file
show-stats: false