---
linters-settings:
  exhaustive:
    default-signifies-exhaustive: true
  gomodguard:
    blocked:
      modules:
        - github.com/tj/assert:
            recommendations:
              - github.com/stretchr/testify/assert
            reason: |
              One assertion library is enough and we use testify/assert
              everywhere.
        - gotest.tools/assert:
            recommendations:
              - github.com/stretchr/testify/assert
            reason: |
              One assertion library is enough and we use testify/assert
              everywhere.
        - github.com/magiconair/properties:
            recommendations:
              - github.com/stretchr/testify/assert
            reason: >
              We do not currently need to parse properties files. At the same
              time this module has an assert package which tends to get
              imported by accident. It is therefore blocked.
        - github.com/gogo/protobuf:
            recommendations:
              - google.golang.org/protobuf
            reason: >
              This is not the protobuf module that we want to import.
        - github.com/golang/protobuf:
            recommendations:
              - google.golang.org/protobuf
            reason: >
              This is the legacy import location of Google's protobuf module.
              Use the new one instead.
  misspell:
    locale: "US"
  revive:
    exported: true
    import-shadowing: true
    indent-error-flow: true

linters:
  disable-all: true
  # Some of these are temporarily disabled until we fix the numerous issues we have.
  enable:
    - bodyclose
    - deadcode
    # - dupl
    # - errcheck
    - exhaustive
    # - gocritic
    # - golint
    # - goimports
    - gomodguard
    - gosec
    # - gosimple
    - govet
    # - ineffassign
    # - misspell
    # - revive
    - rowserrcheck
    # - scopelint
    # - staticcheck
    - structcheck
    - typecheck
    # - unparam
    - unused
    - varcheck
    # - whitespace

issues:
  include:
    - EXC0002  # disable excluding of issues about comments from golint
  exclude-rules:
    - path: _test\.go
      linters:
        - dupl
        - gosec
    - linters:
        - gosec
      text: "G204:"
