Skip to content

Commit 3ee5e09

Browse files
committed
migrate .golangci.yml to v2 format
1 parent 4c06a93 commit 3ee5e09

File tree

2 files changed

+38
-30
lines changed

2 files changed

+38
-30
lines changed

.github/workflows/golangci-lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ jobs:
2323
- name: golangci-lint
2424
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
2525
with:
26-
version: 'v1.55.2'
26+
version: 'v2.1.6'
2727
skip-pkg-cache: true

.golangci.yml

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,41 @@
1-
run:
2-
timeout: 5m
3-
1+
version: "2"
2+
linters:
3+
default: none
4+
enable:
5+
- staticcheck
6+
settings:
7+
staticcheck:
8+
checks:
9+
- all
10+
- -S1040
11+
exclusions:
12+
generated: lax
13+
presets:
14+
- comments
15+
- common-false-positives
16+
- legacy
17+
- std-error-handling
18+
rules:
19+
- linters:
20+
- staticcheck
21+
path: manifest/provider/resource.go
22+
text: 'SA1019: tftypes.ValueFromMsgPack is deprecated: this function is exported for internal use in terraform-plugin-go.'
23+
- linters:
24+
- staticcheck
25+
path: manifest/provider/import.go
26+
text: 'SA1019: impf.MarshalMsgPack is deprecated: this is not meant to be called by third parties.'
27+
paths:
28+
- third_party$
29+
- builtin$
30+
- examples$
431
issues:
5-
max-per-linter: 0
632
max-same-issues: 0
7-
exclude-rules:
8-
- path: manifest/provider/resource.go
9-
linters:
10-
- staticcheck
11-
# We need to use ValueFromMsgPack due to some missing abstraction in plugin-go.
12-
text: "SA1019: tftypes.ValueFromMsgPack is deprecated: this function is exported for internal use in terraform-plugin-go."
13-
- path: manifest/provider/import.go
14-
linters:
15-
- staticcheck
16-
# We need to use MarshalMsgPack due to some missing abstraction in plugin-go.
17-
text: "SA1019: impf.MarshalMsgPack is deprecated: this is not meant to be called by third parties."
18-
19-
linters:
20-
disable-all: true
33+
formatters:
2134
enable:
22-
- gosimple
2335
- gofmt
24-
- staticcheck
25-
26-
linters-settings:
27-
staticcheck:
28-
checks:
29-
- all
30-
gosimple:
31-
checks:
32-
- all
33-
- '-S1040' # Type assertion to current type: https://staticcheck.dev/docs/checks/#S1040
36+
exclusions:
37+
generated: lax
38+
paths:
39+
- third_party$
40+
- builtin$
41+
- examples$

0 commit comments

Comments
 (0)