lab1
This commit is contained in:
+139
@@ -0,0 +1,139 @@
|
||||
# yaml-language-server: $schema=https://golangci-lint.run/jsonschema/golangci.v2.13.jsonschema.json
|
||||
|
||||
version: "2"
|
||||
|
||||
run:
|
||||
timeout: 5m
|
||||
tests: true
|
||||
build-tags:
|
||||
- integration
|
||||
|
||||
linters:
|
||||
default: standard
|
||||
enable:
|
||||
- bodyclose
|
||||
- contextcheck
|
||||
- containedctx
|
||||
- noctx
|
||||
- rowserrcheck
|
||||
- sqlclosecheck
|
||||
- fatcontext
|
||||
- errorlint
|
||||
- errname
|
||||
- nilerr
|
||||
- nilnil
|
||||
- asasalint
|
||||
- durationcheck
|
||||
- exhaustive
|
||||
- forcetypeassert
|
||||
- gocheckcompilerdirectives
|
||||
- gocritic
|
||||
- makezero
|
||||
- musttag
|
||||
- reassign
|
||||
- recvcheck
|
||||
- unparam
|
||||
- wastedassign
|
||||
- gosec
|
||||
- canonicalheader
|
||||
- copyloopvar
|
||||
- exptostd
|
||||
- intrange
|
||||
- perfsprint
|
||||
- unconvert
|
||||
- usestdlibvars
|
||||
- usetesting
|
||||
- prealloc
|
||||
- revive
|
||||
- misspell
|
||||
- nolintlint
|
||||
- gomoddirectives
|
||||
- sloglint
|
||||
- depguard
|
||||
- forbidigo
|
||||
- testifylint
|
||||
- thelper
|
||||
- tparallel
|
||||
|
||||
settings:
|
||||
govet:
|
||||
enable-all: true
|
||||
disable:
|
||||
- fieldalignment
|
||||
- shadow
|
||||
|
||||
gosec:
|
||||
excludes:
|
||||
- G404
|
||||
|
||||
exhaustive:
|
||||
default-signifies-exhaustive: true
|
||||
|
||||
nolintlint:
|
||||
require-explanation: true
|
||||
require-specific: true
|
||||
|
||||
sloglint:
|
||||
attr-only: true
|
||||
no-global: default
|
||||
context: scope
|
||||
|
||||
testifylint:
|
||||
enable-all: true
|
||||
|
||||
depguard:
|
||||
rules:
|
||||
main:
|
||||
deny:
|
||||
- pkg: math/rand$
|
||||
desc: use math/rand/v2
|
||||
- pkg: github.com/pkg/errors
|
||||
desc: use stdlib errors and fmt.Errorf with %w
|
||||
- pkg: io/ioutil
|
||||
desc: deprecated
|
||||
domain:
|
||||
files:
|
||||
- "**/internal/domain/**"
|
||||
deny:
|
||||
- pkg: database/sql
|
||||
desc: domain must not depend on infrastructure
|
||||
- pkg: net/http
|
||||
desc: domain must not depend on transport
|
||||
|
||||
forbidigo:
|
||||
forbid:
|
||||
- pattern: ^fmt\.Print(f|ln)?$
|
||||
msg: use slog
|
||||
- pattern: ^log\.(Print|Fatal|Panic).*$
|
||||
msg: use slog
|
||||
|
||||
exclusions:
|
||||
generated: lax
|
||||
presets:
|
||||
- comments
|
||||
- std-error-handling
|
||||
- common-false-positives
|
||||
rules:
|
||||
- path: _test\.go
|
||||
linters:
|
||||
- gosec
|
||||
- prealloc
|
||||
- forcetypeassert
|
||||
- unparam
|
||||
|
||||
formatters:
|
||||
enable:
|
||||
- gofumpt
|
||||
- goimports
|
||||
settings:
|
||||
gofumpt:
|
||||
module-path: mtusi-messenger
|
||||
goimports:
|
||||
local-prefixes:
|
||||
- mtusi-messenger
|
||||
exclusions:
|
||||
generated: lax
|
||||
|
||||
issues:
|
||||
max-issues-per-linter: 0
|
||||
max-same-issues: 0
|
||||
Reference in New Issue
Block a user