linters-settings:
  govet:
    check-shadowing: true
  golint:
    min-confidence: 0.6
  gocyclo:
    min-complexity: 15
  maligned:
    suggest-new: true
  dupl:
    threshold: 100
  goconst:
    min-len: 2
    min-occurrences: 2
  misspell:
    locale: US
  lll:
    line-length: 140
  gocritic:
    enabled-tags:
      - performance
      - style
      - experimental
    disabled-checks:
      - wrapperFunc
      - hugeParam
      - rangeValCopy

linters:
  disable-all: true
  enable:
    - megacheck
    - revive
    - govet
    - unconvert
    - gas
    - misspell
    - unused
    - typecheck
    - ineffassign
    - stylecheck
    - gochecknoinits
    - exportloopref
    - nakedret
    - gosimple
    - prealloc

  fast: false


run:
  #  modules-download-mode: vendor
  skip-dirs:
    - vendor
  concurrency: 4

issues:
  exclude-rules:
    - text: "should have a package comment, unless it's in another file for this package"
      linters:
        - golint
    - text: "exitAfterDefer:"
      linters:
        - gocritic
    - text: "whyNoLint: include an explanation for nolint directive"
      linters:
        - gocritic
    - text: "go.mongodb.org/mongo-driver/bson/primitive.E"
      linters:
        - govet
    - text: "weak cryptographic primitive"
      linters:
        - gosec
    - text: "at least one file in a package should have a package comment"
      linters:
        - stylecheck
    - text: "should have a package comment"
      linters:
        - revive
    - text: 'Deferring unsafe method "Close" on type "io.ReadCloser"'
      linters:
        - gosec
  exclude-use-default: false
