Skip to content

Commit 46dac05

Browse files
authored
ci: drop Terragrunt-specific no-direct-go-getter depguard rule (#1839)
This depguard rule was carried over from Terragrunt's golangci config. It denies direct github.com/hashicorp/go-getter imports and points to github.com/gruntwork-io/terragrunt/internal/getter as the replacement, but Terratest is a separate Go module and cannot import another module's internal package. Its carve-out paths (internal/getter, internal/util, internal/cas) do not exist here either. Terratest uses go-getter directly in modules/opa, so the rule fails lint on every PR with no valid fix. Removing the rule (and depguard, which had no other rules configured).
1 parent 6d95478 commit 46dac05

1 file changed

Lines changed: 0 additions & 25 deletions

File tree

.golangci.yml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ linters:
1818
- bidichk
1919
- bodyclose
2020
- contextcheck
21-
- depguard
2221
- dupl
2322
- durationcheck
2423
- errchkjson
@@ -60,30 +59,6 @@ linters:
6059
- wsl_v5
6160
- zerologlint
6261
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
8762
dupl:
8863
threshold: 120
8964
errcheck:

0 commit comments

Comments
 (0)