Skip to content

Commit 03682c4

Browse files
Resonance1584github-actions[bot]
authored andcommitted
chore: update golangci-lint config from upstream
1 parent d1d56ec commit 03682c4

2 files changed

Lines changed: 39 additions & 1 deletion

File tree

.golangci.yml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ linters:
1818
- bidichk
1919
- bodyclose
2020
- contextcheck
21+
- depguard
2122
- dupl
2223
- durationcheck
2324
- errchkjson
@@ -29,6 +30,7 @@ linters:
2930
- goconst
3031
- gocritic
3132
- gosmopolitan
33+
- lll
3234
- loggercheck
3335
- makezero
3436
- misspell
@@ -58,6 +60,30 @@ linters:
5860
- wsl_v5
5961
- zerologlint
6062
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
6187
dupl:
6288
threshold: 120
6389
errcheck:
@@ -102,7 +128,6 @@ linters:
102128
- dupl
103129
- errcheck
104130
- gocyclo
105-
- lll
106131
- mnd
107132
- unparam
108133
- wsl
@@ -111,6 +136,19 @@ 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/
146+
# Incrementally linting lines that are too long to ensure that
147+
# we don't have conflicts on every file in the codebase while
148+
# trying to get this merged in.
149+
- linters:
150+
- lll
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/)'
114152
paths:
115153
- docs
116154
- _ci
-16 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)