linters:
  enable:
    - errcheck
    - gosimple
    - govet
    - ineffassign
    - staticcheck
    - unused
    - gofmt
    - misspell
    - unconvert
    - unparam
    - prealloc
    - gocritic
    - revive

linters-settings:
  errcheck:
    check-type-assertions: true
    check-blank: true
  govet:
    enable:
      - shadow
  revive:
    rules:
      - name: blank-imports
      - name: context-as-argument
      - name: dot-imports
      - name: error-return
      - name: error-strings
      - name: error-naming
      - name: exported
      - name: if-return
      - name: increment-decrement
      - name: var-naming
      - name: var-declaration
      - name: range
      - name: receiver-naming
      - name: indent-error-flow
      - name: superfluous-else
      - name: unreachable-code
      - name: redefines-builtin-id

issues:
  exclude-rules:
    # Exclude some linters from running on test files
    - path: _test\.go
      linters:
        - errcheck
        - gocritic
        - unparam
    # Exclude known issues in test files
    - path: _test\.go
      text: "func name"

run:
  timeout: 5m
  modules-download-mode: readonly