# https://golangci-lint.run/usage/configuration#config-file

run:
  concurrency: 4
  deadline: 5m
  issues-exit-code: 1
  tests: true
  skip-dirs:
    - misc
    # The package is ported from containerd project, let's skip it.
    - pkg/remote/remotes

linters-settings:
  #   govet:
  #     check-shadowing: true
  #     enable:
  #       - fieldalignment
  funlen:
    # Checks the number of lines in a function.
    # If lower than 0, disable the check.
    # Default: 60
    lines: 100
    # Checks the number of statements in a function.
    # If lower than 0, disable the check.
    # Default: 40
    statements: 80
  nilnil:
    checked-types:
      - ptr
      - func
      - iface
      - map
      - chan

linters:
  enable:
    - staticcheck
    - unconvert
    - gofmt
    - goimports
    - revive
    - ineffassign
    - vet
    - unused
    - misspell
    - bodyclose
    # - cyclop
    - dogsled
    - nilnil
    - unparam
    - nilerr
    # - goerr113
    - exportloopref
    # - gosec
    - gocritic
    - prealloc
    - tenv
    # - funlen
    - exhaustive
    - errcheck
  disable:
    - gosec
