---
# The most valuable linters; they are required to pass for PR to be merged.

linters-settings:
  depguard:
    list-type: blacklist
    include-go-root: true
    packages:
      # use "github.com/pkg/errors" instead
      - errors
      # we use "github.com/golang/protobuf/proto" for now
      - github.com/gogo/protobuf/proto
      - google.golang.org/protobuf/proto
      # use "github.com/percona-platform/saas" instead
      - github.com/percona-platform/platform
      # use "gopkg.in/yaml.v3" instead
      - gopkg.in/yaml.v2

  goimports:
    local-prefixes: github.com/percona/pmm-managed

  gci:
    sections:
      - standard # Captures all standard packages if they do not match another section.
      - default # Contains all imports that could not be matched to another section type.
      - prefix(github.com/percona/pmm-managed) # Groups all local imports.

  gomoddirectives:
    replace-allow-list:
      - github.com/percona/pmm
      - github.com/percona-platform/dbaas-api

linters:
  disable-all: true
  enable:
    # keep sorted
    - depguard
    - gci
    - goimports
    - govet
    - ineffassign
    - nolintlint
    - staticcheck

issues:
  exclude-use-default: false
