version: "2"
linters:
  default: none
  enable:
    - errcheck
    - goconst
    - gocyclo
    - govet
    - ineffassign
    - misspell
    - revive
    - staticcheck
    - unconvert
    - unparam
    - unused
  settings:
    dupl:
      threshold: 100
    goconst:
      min-len: 2
      min-occurrences: 5
    gocyclo:
      min-complexity: 70
    govet:
      settings:
        printf:
          funcs:
            - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
            - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
            - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
            - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
    misspell:
      locale: US
  exclusions:
    generated: lax
    presets:
      - comments
      - common-false-positives
      - legacy
      - std-error-handling
    rules:
      - linters:
          - misspell
        path: person.go
      - linters:
          - misspell
        path: datetime.go
      - path: .
        text: parameter 'v' seems to be unused
    paths:
      - third_party$
      - builtin$
      - examples$
formatters:
  exclusions:
    generated: lax
    paths:
      - third_party$
      - builtin$
      - examples$
