version: "2"
run:
  go: "1.25"
  issues-exit-code: 1
  tests: true
output:
  formats:
    text:
      path: stdout
      print-linter-name: true
      print-issued-lines: true
linters:
  enable:
    - asasalint
    - asciicheck
    - bidichk
    - bodyclose
    - canonicalheader
    - containedctx
    - contextcheck
    - copyloopvar
    - cyclop
    - decorder
    - dogsled
    - dupl
    - durationcheck
    - err113
    - errchkjson
    - errname
    - errorlint
    - exhaustive
    - exptostd
    - fatcontext
    - forbidigo
    - forcetypeassert
    - funlen
    - ginkgolinter
    - gocheckcompilerdirectives
    - gochecknoglobals
    - gochecknoinits
    - gochecksumtype
    - gocognit
    - goconst
    - gocritic
    - godot
    - godox
    - goheader
    - gomoddirectives
    - gomodguard
    - goprintffuncname
    - gosmopolitan
    - grouper
    - iface
    - importas
    - inamedparam
    - interfacebloat
    - intrange
    - ireturn
    - lll
    - loggercheck
    - maintidx
    - makezero
    - mirror
    - misspell
    - mnd
    - musttag
    - nakedret
    - nestif
    - nilerr
    - nilnesserr
    - nilnil
    - nlreturn
    - noctx
    - nolintlint
    - nonamedreturns
    - nosprintfhostport
    - paralleltest
    - perfsprint
    - prealloc
    - predeclared
    - promlinter
    - protogetter
    - reassign
    - recvcheck
    - revive
    - rowserrcheck
    - sloglint
    - spancheck
    - sqlclosecheck
    - staticcheck
    - tagalign
    - tagliatelle
    - testableexamples
    - testifylint
    - testpackage
    - thelper
    - tparallel
    - unconvert
    - unparam
    - usestdlibvars
    - usetesting
    - varnamelen
    - wastedassign
    - whitespace
    - wrapcheck
    - wsl
    - zerologlint
  disable:
    - depguard
    - exhaustruct
    - gocyclo
    - gosec
  settings:
    dupl:
      threshold: 120
    errcheck:
      check-type-assertions: false
      check-blank: false
      exclude-functions:
        - (*os.File).Close
    errorlint:
      errorf: true
      asserts: true
      comparison: true
    goconst:
      min-len: 3
      min-occurrences: 5
    gocritic:
      disabled-checks:
        - regexpMust
        - rangeValCopy
        - appendAssign
        - hugeParam
      enabled-tags:
        - performance
      disabled-tags:
        - experimental
    govet:
      enable:
        - fieldalignment
    lll:
      line-length: 140
    nakedret:
      max-func-lines: 20
    staticcheck:
      checks:
        - all
        - -SA9005
    unparam:
      check-exported: false
    wrapcheck:
      ignore-package-globs:
        - github.com/gruntwork-io/terragrunt/*
  exclusions:
    generated: lax
    rules:
      - linters:
          - dupl
          - errcheck
          - gocyclo
          - lll
          - mnd
          - unparam
          - wsl
        path: _test\.go
    paths:
      - docs
      - _ci
      - .github
      - .circleci
      - third_party$
      - builtin$
      - examples$
issues:
  max-issues-per-linter: 0
  max-same-issues: 0
formatters:
  enable:
    - goimports
  settings:
    gofmt:
      simplify: true
  exclusions:
    generated: lax
    paths:
      - docs
      - _ci
      - .github
      - .circleci
      - third_party$
      - builtin$
      - examples$
