run:
  timeout: 3m

linters-settings:
  errcheck:
    ignore: fmt:.*,Read|Write|Close|Exec,io:Copy
  dupl:
    threshold: 100
  funlen:
    lines: 110
    statements: 100
  goheader:
    template: |-
      Copyright 2019-present Facebook Inc. All rights reserved.
      This source code is licensed under the Apache 2.0 license found
      in the LICENSE file in the root directory of this source tree.

linters:
  disable-all: true
  enable:
    - bodyclose
    - deadcode
    - depguard
    - dogsled
    - dupl
    - errcheck
    - funlen
    - gocritic
    - gofmt
    - goheader
    - gosec
    - gosimple
    - govet
    - ineffassign
    - interfacer
    - misspell
    - staticcheck
    - structcheck
    - stylecheck
    - typecheck
    - unconvert
    - unused
    - varcheck
    - whitespace

issues:
  exclude-rules:
    - path: _test\.go
      linters:
        - dupl
        - funlen
        - gosec
    - linters:
        - unused
      source: ent.Schema
    - path: entc/integration/ent/schema/card.go
      text: "`internal` is unused"
    - path: dialect/sql/builder.go
      text: "can be `Querier`"
      linters:
        - interfacer
    - path: dialect/sql/builder.go
      text: "SQL string concatenation"
      linters:
        - gosec
    - path: dialect/sql/schema
      linters:
        - dupl
        - gosec
    - text: "Expect WriteFile permissions to be 0600 or less"
      linters:
        - gosec
    - path: privacy/privacy.go
      linters:
        - stylecheck
