Skip to content

Commit 9adb46b

Browse files
authored
Remove references to a removed linter (#1163)
`structcheck` was removed in golangci-lint v2. https://golangci-lint.run/product/migration-guide/#deprecated-linters
1 parent 69c8080 commit 9adb46b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

internal/reflect/helpers_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type ExampleStruct struct {
2121
BoolField bool `tfsdk:"bool_field"`
2222
IgnoreMe string `tfsdk:"-"`
2323

24-
unexported string //nolint:structcheck,unused
24+
unexported string //nolint:unused
2525
unexportedAndTagged string `tfsdk:"unexported_and_tagged"`
2626
}
2727

@@ -136,7 +136,7 @@ func TestGetStructTags(t *testing.T) {
136136
ExampleStruct
137137
Field5 string `tfsdk:"field5"`
138138

139-
unexported string //nolint:structcheck,unused
139+
unexported string //nolint:unused
140140
unexportedAndTagged string `tfsdk:"unexported_and_tagged"`
141141
}{},
142142
expectedTags: map[string][]int{
@@ -193,7 +193,7 @@ func TestGetStructTags(t *testing.T) {
193193
*ExampleStruct
194194
Field5 string `tfsdk:"field5"`
195195

196-
unexported string //nolint:structcheck,unused
196+
unexported string //nolint:unused
197197
unexportedAndTagged string `tfsdk:"unexported_and_tagged"`
198198
}{},
199199
expectedTags: map[string][]int{

internal/reflect/struct_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ func TestNewStruct_structtags_ignores(t *testing.T) {
809809

810810
var s struct {
811811
ExportedAndTagged string `tfsdk:"exported_and_tagged"`
812-
unexported string //nolint:structcheck,unused
812+
unexported string //nolint:unused
813813
unexportedAndTagged string `tfsdk:"unexported_and_tagged"`
814814
ExportedAndExcluded string `tfsdk:"-"`
815815
}
@@ -850,13 +850,13 @@ func TestNewStruct_embedded_structtags_ignores(t *testing.T) {
850850

851851
type s1 struct {
852852
ExportedAndTagged string `tfsdk:"exported_and_tagged"`
853-
unexported string //nolint:structcheck,unused
853+
unexported string //nolint:unused
854854
unexportedAndTagged string `tfsdk:"unexported_and_tagged"`
855855
ExportedAndExcluded string `tfsdk:"-"`
856856
}
857857

858858
type s2 struct {
859-
unexportedField string //nolint:structcheck,unused
859+
unexportedField string //nolint:unused
860860
}
861861

862862
var s struct {
@@ -2149,7 +2149,7 @@ func TestFromStruct_structtags_ignores(t *testing.T) {
21492149

21502150
type s struct {
21512151
ExportedAndTagged string `tfsdk:"exported_and_tagged"`
2152-
unexported string //nolint:structcheck,unused
2152+
unexported string //nolint:unused
21532153
unexportedAndTagged string `tfsdk:"unexported_and_tagged"`
21542154
ExportedAndExcluded string `tfsdk:"-"`
21552155
}
@@ -2188,13 +2188,13 @@ func TestFromStruct_embedded_structtags_ignores(t *testing.T) {
21882188

21892189
type s1 struct {
21902190
ExportedAndTagged string `tfsdk:"exported_and_tagged"`
2191-
unexported string //nolint:structcheck,unused
2191+
unexported string //nolint:unused
21922192
unexportedAndTagged string `tfsdk:"unexported_and_tagged"`
21932193
ExportedAndExcluded string `tfsdk:"-"`
21942194
}
21952195

21962196
type s2 struct {
2197-
unexportedField string //nolint:structcheck,unused
2197+
unexportedField string //nolint:unused
21982198
}
21992199

22002200
type s struct {

0 commit comments

Comments
 (0)