@@ -18,6 +18,7 @@ linters:
1818 - bidichk
1919 - bodyclose
2020 - contextcheck
21+ - depguard
2122 - dupl
2223 - durationcheck
2324 - errchkjson
@@ -59,6 +60,30 @@ linters:
5960 - wsl_v5
6061 - zerologlint
6162 settings :
63+ depguard :
64+ rules :
65+ no-direct-go-getter :
66+ # Direct hashicorp/go-getter imports are confined to the internal/getter
67+ # package (which owns the integration) plus two carve-out files that
68+ # would otherwise create import cycles. Everything else must go through
69+ # internal/getter.
70+ list-mode : lax
71+ files :
72+ - $all
73+ - " !**/internal/getter/**"
74+ - " !**/internal/util/file.go"
75+ - " !**/internal/cas/stacks.go"
76+ deny :
77+ - pkg : github.com/hashicorp/go-getter
78+ desc : use github.com/gruntwork-io/terragrunt/internal/getter instead
79+ - pkg : github.com/hashicorp/go-getter/v2
80+ desc : use github.com/gruntwork-io/terragrunt/internal/getter instead
81+ - pkg : github.com/hashicorp/go-getter/v2/helper/url
82+ desc : use github.com/gruntwork-io/terragrunt/internal/getter URLParse instead
83+ - pkg : github.com/hashicorp/go-getter/s3/v2
84+ desc : use github.com/gruntwork-io/terragrunt/internal/getter instead
85+ - pkg : github.com/hashicorp/go-getter/gcs/v2
86+ desc : use github.com/gruntwork-io/terragrunt/internal/getter instead
6287 dupl :
6388 threshold : 120
6489 errcheck :
@@ -111,16 +136,24 @@ linters:
111136 - linters :
112137 - dupl
113138 path : cli/flags/shared
139+ # BubbleTea's tea.Model expects value-receiver methods (Init/Update/View),
140+ # so Model and WelcomeModel in the TUI packages trip gocritic's hugeParam
141+ # check. Silence it for these packages only; hugeParam still runs everywhere else.
142+ - linters :
143+ - gocritic
144+ text : " hugeParam:"
145+ path : internal/cli/commands/catalog/tui/
114146 # Incrementally linting lines that are too long to ensure that
115147 # we don't have conflicts on every file in the codebase while
116148 # trying to get this merged in.
117149 - linters :
118150 - lll
119- path-except : ' ^(internal/awshelper/|internal/cas/)'
151+ path-except : ' ^(internal/awshelper/|internal/cas/|internal/cli/commands/(backend/(delete|migrate)|catalog/tui/command|dag/graph|exec|find|help|list|scaffold|stack)/|internal/cloner/|internal/codegen/|internal/configbridge/|internal/discovery/|internal/engine/|internal/errorconfig/|internal/errors/|internal/experiment/|internal/gcphelper/|internal/git/|internal/os/exec/|internal/prepare/|internal/queue/|internal/report/|internal/retry/|internal/runner/(common|graph|run/creds|runall|runcfg)/|internal/stacks/(generate|output)/|internal/telemetry/|internal/tf/cache/(controllers|middleware)/|internal/tflint/|internal/tips/|internal/vfs/|internal/worktrees/|pkg/log/(format/(options|placeholders)|writer)/|pkg/options/ )'
120152 paths :
121153 - docs
122154 - _ci
123155 - .github
156+ - .circleci
124157 - third_party$
125158 - builtin$
126159 - examples$
@@ -139,6 +172,7 @@ formatters:
139172 - docs
140173 - _ci
141174 - .github
175+ - .circleci
142176 - third_party$
143177 - builtin$
144178 - examples$
0 commit comments