This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
version:"2"
formatters:
enable:
- gci
- gofumpt
settings:
gci:
sections:
- standard
- default
- prefix(github.com/shirou)
issues:
max-same-issues:0
linters:
enable:
- asciicheck
- contextcheck
- durationcheck
- errorlint
- gocritic
- gomodguard
- gosec
- govet
- importas
- ineffassign
- misspell
- nakedret
- nolintlint
- perfsprint
- predeclared
- revive
- staticcheck
- testifylint
- thelper
- unparam
- usetesting
disable:
- errcheck
- unused
settings:
gocritic:
disabled-checks:
- captLocal
gomodguard:
blocked:
modules:
- io/ioutil:
recommendations:
- io
- os
gosec:
excludes:
- G115
govet:
disable:
- copylocks
- fieldalignment
- shadow
- testinggoroutine
enable-all:true
perfsprint:
# Optimizes even if it requires an int or uint type cast.
int-conversion:true
# Optimizes into `err.Error()` even if it is only equivalent for non-nil errors.
err-error:true
# Optimizes `fmt.Errorf`.
errorf:true
# Optimizes `fmt.Sprintf` with only one argument.
sprintf1:true
# Optimizes into strings concatenation.
strconcat:true
revive:
rules:
- name:blank-imports
- name:context-as-argument
arguments:
- allowTypesBefore:"*testing.T"
- name:context-keys-type
- name:dot-imports
- name:duplicated-imports
- name:early-return
arguments:
- "preserveScope"
- name:empty-block
disabled:true
- name:error-naming
- name:error-return
- name:error-strings
- name:exported
disabled:true
- name:errorf
- name:increment-decrement
- name:indent-error-flow
arguments:
- "preserveScope"
- name:range
- name:receiver-naming
- name:redefines-builtin-id
- name:redundant-import-alias
- name:superfluous-else
arguments:
- "preserveScope"
- name:time-naming
- name:unexported-return
- name:unnecessary-stmt
- name:unreachable-code
- name:unused-parameter
- name:use-any
- name:var-declaration
- name:var-naming
arguments:
- ["ID"]# AllowList
- ["VM"]# DenyList
- - upperCaseConst:true# Extra parameter (upperCaseConst|skipPackageNameChecks)
staticcheck:
checks:
- all
- -SA1019# Using a deprecated function, variable, constant or field
- -SA2002# Called testing.T.FailNow or SkipNow in a goroutine, which isn’t allowed
- -SA4003# Comparing unsigned values against negative values is pointless
- -SA4004# The loop exits unconditionally after one iteration
- -SA4008# The variable in the loop condition never changes, are you incrementing the wrong variable?
- -SA5003# Defers in infinite loops will never execute