linters-settings:
  gocritic:
    enabled-tags:
      - diagnostic
      - experimental
      - opinionated
      - performance
      - style
    disabled-checks:
      - dupImport
      - ifElseChain
      - octalLiteral
      - whyNoLint
      - wrapperFunc
      - exitAfterDefer
      - hugeParam
      - ptrToRefParam
      - paramTypeCombine
      - unnamedResult
linters:
  disable-all: true
  enable:
    # default linters
    - errcheck
    - gosimple
    - govet
    - ineffassign
    - staticcheck
    - typecheck
    - unused
    # additional linters
    - asasalint
    - asciicheck
    - bidichk
    - bodyclose
    - containedctx
    - contextcheck
    - decorder
    - dupl
    - durationcheck
    - errchkjson
    - errname
    - errorlint
    - exhaustive
    - exhaustruct
    - exportloopref
    - forcetypeassert
    - gocheckcompilerdirectives
    - gocritic
    - godot
    - godox
    - goerr113
    - gofmt
    - goprintffuncname
    - gosec
    - gosmopolitan
    - importas
    - ireturn
    - nakedret
    - nestif
    - nilerr
    - nilnil
    - prealloc
    - predeclared
    - revive
    - rowserrcheck
    - tagalign
    - tenv
    - thelper
    - tparallel
    - unconvert
    - unparam
    - usestdlibvars
    - wastedassign
    - whitespace
    - wrapcheck
    - wsl
    - gocyclo
    - misspell
issues:
  include:
    - EXC0012
    - EXC0014
  exclude-rules:
    - path: _test\.go
      linters:
        - gocyclo
        - errcheck
        - dupl
        - gosec
        - gocritic
    - linters:
        - gocritic
      text: "unnecessaryDefer:"
    - linters:
        - gocritic
      text: "preferDecodeRune:"
service:
  golangci-lint-version: 1.53.x
