2025-08-16 01:19:00 +02:00
|
|
|
version: "2"
|
2020-09-11 17:49:29 +02:00
|
|
|
|
2025-08-16 01:19:00 +02:00
|
|
|
run:
|
|
|
|
|
timeout: 5m
|
2019-12-06 11:41:59 +01:00
|
|
|
|
|
|
|
|
linters:
|
2025-08-16 01:19:00 +02:00
|
|
|
enable:
|
|
|
|
|
- bodyclose
|
|
|
|
|
- dogsled
|
|
|
|
|
- dupl
|
|
|
|
|
- durationcheck
|
|
|
|
|
- exhaustive
|
|
|
|
|
- gocritic
|
|
|
|
|
- godot
|
|
|
|
|
- gomoddirectives
|
|
|
|
|
- goprintffuncname
|
|
|
|
|
- govet
|
|
|
|
|
- importas
|
|
|
|
|
- ineffassign
|
|
|
|
|
- makezero
|
|
|
|
|
- misspell
|
|
|
|
|
- nakedret
|
|
|
|
|
- nilerr
|
|
|
|
|
- noctx
|
|
|
|
|
- nolintlint
|
|
|
|
|
- prealloc
|
|
|
|
|
- predeclared
|
2025-08-16 06:47:16 +02:00
|
|
|
- revive
|
2025-08-16 01:19:00 +02:00
|
|
|
- rowserrcheck
|
|
|
|
|
- sqlclosecheck
|
|
|
|
|
- staticcheck
|
|
|
|
|
- tparallel
|
|
|
|
|
- unconvert
|
|
|
|
|
- unparam
|
|
|
|
|
- unused
|
|
|
|
|
- wastedassign
|
|
|
|
|
- whitespace
|
|
|
|
|
|
|
|
|
|
# fixme
|
|
|
|
|
# - cyclop
|
|
|
|
|
# - errcheck
|
|
|
|
|
# - errorlint
|
|
|
|
|
# - exhaustivestruct
|
|
|
|
|
# - forbidigo
|
|
|
|
|
# - forcetypeassert
|
|
|
|
|
# - gochecknoglobals
|
|
|
|
|
# - gochecknoinits
|
|
|
|
|
# - gocognit
|
|
|
|
|
# - goconst
|
|
|
|
|
# - gocyclo
|
|
|
|
|
# - gosec
|
|
|
|
|
# - gosimple
|
|
|
|
|
# - ifshort
|
|
|
|
|
# - lll
|
|
|
|
|
# - nlreturn
|
|
|
|
|
# - paralleltest
|
|
|
|
|
# - scopelint
|
|
|
|
|
# - thelper
|
|
|
|
|
# - wrapcheck
|
2019-12-06 11:41:59 +01:00
|
|
|
|
2025-08-16 01:19:00 +02:00
|
|
|
# unused
|
|
|
|
|
# - depguard
|
|
|
|
|
# - goheader
|
|
|
|
|
# - gomodguard
|
2020-01-16 19:37:50 +01:00
|
|
|
|
2025-08-16 01:19:00 +02:00
|
|
|
# don't enable:
|
|
|
|
|
# - asciicheck
|
|
|
|
|
# - funlen
|
|
|
|
|
# - godox
|
|
|
|
|
# - goerr113
|
|
|
|
|
# - gomnd
|
|
|
|
|
# - interfacer
|
|
|
|
|
# - maligned
|
|
|
|
|
# - nestif
|
|
|
|
|
# - testpackage
|
|
|
|
|
# - wsl
|
2020-09-11 17:43:32 +02:00
|
|
|
|
2025-08-16 06:47:16 +02:00
|
|
|
exclusions:
|
|
|
|
|
rules:
|
|
|
|
|
- linters:
|
|
|
|
|
- errcheck
|
|
|
|
|
- noctx
|
|
|
|
|
path: _test.go
|
|
|
|
|
presets:
|
|
|
|
|
- std-error-handling
|
2023-04-06 10:57:10 +02:00
|
|
|
|
2025-08-16 01:19:00 +02:00
|
|
|
settings:
|
2025-08-16 10:12:35 +02:00
|
|
|
revive:
|
|
|
|
|
rules:
|
|
|
|
|
- name: blank-imports
|
|
|
|
|
- name: context-as-argument
|
|
|
|
|
arguments:
|
|
|
|
|
- allowTypesBefore: "*testing.T"
|
|
|
|
|
- name: context-keys-type
|
|
|
|
|
- name: dot-imports
|
|
|
|
|
- name: empty-block
|
|
|
|
|
- name: error-naming
|
|
|
|
|
- name: error-return
|
|
|
|
|
- name: error-strings
|
|
|
|
|
- name: errorf
|
|
|
|
|
- name: exported
|
|
|
|
|
arguments:
|
|
|
|
|
- "sayRepetitiveInsteadOfStutters" # make error messages clearer
|
|
|
|
|
- name: increment-decrement
|
|
|
|
|
- name: indent-error-flow
|
|
|
|
|
- name: package-comments
|
|
|
|
|
disabled: true # disable package comments rule for now
|
|
|
|
|
- name: range
|
|
|
|
|
- name: redefines-builtin-id
|
|
|
|
|
- name: superfluous-else
|
|
|
|
|
- name: time-naming
|
|
|
|
|
- name: unexported-return
|
|
|
|
|
- name: unreachable-code
|
|
|
|
|
- name: unused-parameter
|
|
|
|
|
- name: var-declaration
|
|
|
|
|
- name: var-naming
|
|
|
|
|
|
|
|
|
|
# TODO: add more revive rules
|
|
|
|
|
|
2025-08-16 01:19:00 +02:00
|
|
|
misspell:
|
|
|
|
|
locale: US
|
|
|
|
|
nolintlint:
|
|
|
|
|
allow-unused: false # report any unused nolint directives
|
|
|
|
|
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
|
|
|
|
|
gocritic:
|
|
|
|
|
# Enable multiple checks by tags. See "Tags" section in https://github.com/go-critic/go-critic#usage.
|
|
|
|
|
enabled-tags:
|
|
|
|
|
- diagnostic
|
|
|
|
|
- experimental
|
|
|
|
|
- opinionated
|
|
|
|
|
- style
|
|
|
|
|
disabled-checks:
|
|
|
|
|
- importShadow
|
|
|
|
|
- unnamedResult
|
|
|
|
|
|
|
|
|
|
formatters:
|
|
|
|
|
enable:
|
|
|
|
|
- gci
|
|
|
|
|
- gofmt
|
|
|
|
|
- gofumpt
|
|
|
|
|
- goimports
|
|
|
|
|
# - golines
|
|
|
|
|
|
|
|
|
|
settings:
|
|
|
|
|
gci:
|
|
|
|
|
sections:
|
|
|
|
|
- standard
|
|
|
|
|
- default
|
|
|
|
|
- localmodule
|