mirror of
https://github.com/go-sigma/sigma.git
synced 2026-10-28 13:34:34 +08:00
Turn on golangci-lint's modernize linter so the go fix modernizations are enforced going forward. Verification: - golangci-lint run (0 issues)
63 lines
1.1 KiB
YAML
63 lines
1.1 KiB
YAML
# yaml-language-server: $schema=https://golangci-lint.run/jsonschema/golangci.jsonschema.json
|
|
version: "2"
|
|
run:
|
|
go: "1.27"
|
|
linters:
|
|
enable:
|
|
- asciicheck
|
|
- bidichk
|
|
- bodyclose
|
|
- copyloopvar
|
|
- cyclop
|
|
- gocritic
|
|
- gosec
|
|
- misspell
|
|
- modernize
|
|
- prealloc
|
|
- unconvert
|
|
- unparam
|
|
- varnamelen
|
|
- whitespace
|
|
settings:
|
|
cyclop:
|
|
max-complexity: 50
|
|
package-average: 50
|
|
varnamelen:
|
|
max-distance: 6
|
|
min-name-length: 1
|
|
whitespace:
|
|
multi-func: true
|
|
exclusions:
|
|
generated: lax
|
|
presets:
|
|
- comments
|
|
- common-false-positives
|
|
- legacy
|
|
- std-error-handling
|
|
rules:
|
|
- linters:
|
|
- cyclop
|
|
path: (.+)_test\.go
|
|
paths:
|
|
- third_party$
|
|
- builtin$
|
|
- examples$
|
|
formatters:
|
|
enable:
|
|
- gci
|
|
- goimports
|
|
settings:
|
|
gci:
|
|
sections:
|
|
- standard
|
|
- blank
|
|
- default
|
|
- prefix(github.com/go-sigma/sigma)
|
|
- dot
|
|
exclusions:
|
|
generated: lax
|
|
paths:
|
|
- third_party$
|
|
- builtin$
|
|
- examples$
|