mirror of
https://github.com/aykhans/go-utils.git
synced 2025-10-15 18:25:57 +00:00
first commit
This commit is contained in:
102
.golangci.yaml
Normal file
102
.golangci.yaml
Normal file
@@ -0,0 +1,102 @@
|
||||
version: "2"
|
||||
|
||||
run:
|
||||
go: "1.25"
|
||||
concurrency: 12
|
||||
|
||||
linters:
|
||||
default: none
|
||||
enable:
|
||||
- asciicheck
|
||||
- errcheck
|
||||
- govet
|
||||
- ineffassign
|
||||
- misspell
|
||||
- nakedret
|
||||
- nolintlint
|
||||
- prealloc
|
||||
- reassign
|
||||
- staticcheck
|
||||
- unconvert
|
||||
- unused
|
||||
- whitespace
|
||||
- bidichk
|
||||
- bodyclose
|
||||
- containedctx
|
||||
- contextcheck
|
||||
- copyloopvar
|
||||
- embeddedstructfieldcheck
|
||||
- errchkjson
|
||||
- errorlint
|
||||
- exptostd
|
||||
- fatcontext
|
||||
- forcetypeassert
|
||||
- funcorder
|
||||
- gocheckcompilerdirectives
|
||||
- gocritic
|
||||
- gomoddirectives
|
||||
- gosec
|
||||
- gosmopolitan
|
||||
- grouper
|
||||
- importas
|
||||
- inamedparam
|
||||
- intrange
|
||||
- loggercheck
|
||||
- mirror
|
||||
- musttag
|
||||
- perfsprint
|
||||
- predeclared
|
||||
- tagalign
|
||||
- tagliatelle
|
||||
- testifylint
|
||||
- thelper
|
||||
- tparallel
|
||||
- unparam
|
||||
- usestdlibvars
|
||||
- usetesting
|
||||
- varnamelen
|
||||
- wastedassign
|
||||
|
||||
settings:
|
||||
staticcheck:
|
||||
checks:
|
||||
- "all"
|
||||
- "-S1002"
|
||||
- "-ST1000"
|
||||
varnamelen:
|
||||
ignore-decls:
|
||||
- w http.ResponseWriter
|
||||
|
||||
exclusions:
|
||||
rules:
|
||||
- path: _test\.go$
|
||||
linters:
|
||||
- errorlint
|
||||
- forcetypeassert
|
||||
- perfsprint
|
||||
- errcheck
|
||||
- gosec
|
||||
- varnamelen
|
||||
|
||||
- path: _test\.go$
|
||||
linters:
|
||||
- staticcheck
|
||||
text: "SA5011"
|
||||
|
||||
formatters:
|
||||
enable:
|
||||
- gofmt
|
||||
|
||||
settings:
|
||||
gofmt:
|
||||
# Simplify code: gofmt with `-s` option.
|
||||
# Default: true
|
||||
simplify: true
|
||||
# Apply the rewrite rules to the source before reformatting.
|
||||
# https://pkg.go.dev/cmd/gofmt
|
||||
# Default: []
|
||||
rewrite-rules:
|
||||
- pattern: "interface{}"
|
||||
replacement: "any"
|
||||
- pattern: "a[b:len(a)]"
|
||||
replacement: "a[b:]"
|
Reference in New Issue
Block a user