File tree 12 files changed +21
-18
lines changed
12 files changed +21
-18
lines changed Original file line number Diff line number Diff line change 16
16
17
17
- uses : golangci/golangci-lint-action@v6
18
18
with :
19
- version : v1.59 .1 # renovate: datasource=github-releases depName=golangci/golangci-lint
19
+ version : v1.60 .1 # renovate: datasource=github-releases depName=golangci/golangci-lint
20
20
21
21
# In general linting is quite fast with warm caches, but a fresh run might
22
22
# take some time.
Original file line number Diff line number Diff line change 29
29
30
30
test:lint :
31
31
stage : test
32
- image : golangci/golangci-lint:v1.59
32
+ image : golangci/golangci-lint:v1.60
33
33
script :
34
34
- golangci-lint run -v
35
35
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ func UploadedResource() *schema.Resource {
84
84
Elem : schema .TypeString ,
85
85
ValidateDiagFunc : func (i interface {}, path cty.Path ) diag.Diagnostics { // nolint:revive
86
86
if ok , err := hcloud .ValidateResourceLabels (i .(map [string ]interface {})); ! ok {
87
- return diag .Errorf (err . Error () )
87
+ return diag .FromErr (err )
88
88
}
89
89
return nil
90
90
},
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ func Resource() *schema.Resource {
41
41
Computed : true ,
42
42
ValidateDiagFunc : func (i interface {}, path cty.Path ) diag.Diagnostics { // nolint:revive
43
43
if ok , err := hcloud .ValidateResourceLabels (i .(map [string ]interface {})); ! ok {
44
- return diag .Errorf (err . Error () )
44
+ return diag .FromErr (err )
45
45
}
46
46
return nil
47
47
},
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ func Resource() *schema.Resource {
65
65
Optional : true ,
66
66
ValidateDiagFunc : func (i interface {}, path cty.Path ) diag.Diagnostics { // nolint:revive
67
67
if ok , err := hcloud .ValidateResourceLabels (i .(map [string ]interface {})); ! ok {
68
- return diag .Errorf (err . Error () )
68
+ return diag .FromErr (err )
69
69
}
70
70
return nil
71
71
},
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ func Resource() *schema.Resource {
90
90
Computed : true ,
91
91
ValidateDiagFunc : func (i interface {}, path cty.Path ) diag.Diagnostics { // nolint:revive
92
92
if ok , err := hcloud .ValidateResourceLabels (i .(map [string ]interface {})); ! ok {
93
- return diag .Errorf (err . Error () )
93
+ return diag .FromErr (err )
94
94
}
95
95
return nil
96
96
},
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ func Resource() *schema.Resource {
45
45
Optional : true ,
46
46
ValidateDiagFunc : func (i interface {}, path cty.Path ) diag.Diagnostics { // nolint:revive
47
47
if ok , err := hcloud .ValidateResourceLabels (i .(map [string ]interface {})); ! ok {
48
- return diag .Errorf (err . Error () )
48
+ return diag .FromErr (err )
49
49
}
50
50
return nil
51
51
},
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ func Resource() *schema.Resource {
34
34
Optional : true ,
35
35
ValidateDiagFunc : func (i interface {}, path cty.Path ) diag.Diagnostics { // nolint:revive
36
36
if ok , err := hcloud .ValidateResourceLabels (i .(map [string ]interface {})); ! ok {
37
- return diag .Errorf (err . Error () )
37
+ return diag .FromErr (err )
38
38
}
39
39
return nil
40
40
},
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ func Resource() *schema.Resource {
72
72
Optional : true ,
73
73
ValidateDiagFunc : func (i interface {}, path cty.Path ) diag.Diagnostics { // nolint:revive
74
74
if ok , err := hcloud .ValidateResourceLabels (i .(map [string ]interface {})); ! ok {
75
- return diag .Errorf (err . Error () )
75
+ return diag .FromErr (err )
76
76
}
77
77
return nil
78
78
},
Original file line number Diff line number Diff line change @@ -191,13 +191,16 @@ func TestPrimaryIPResource_with_server(t *testing.T) {
191
191
primaryIPv4One .AssigneeID != srv .ID {
192
192
return nil
193
193
}
194
- return fmt .Errorf ("State is not as expected: \n " +
195
- fmt .Sprintf ("primary IP v2 two has assignee id %d which not equals target server id %d" ,
196
- primaryIPv4Two .AssigneeID , srv .ID ) + "\n " +
197
- fmt .Sprintf ("primary IP v1 one has assignee id %d and should shouldnt be assigned to server id %d" ,
198
- primaryIPv4One .AssigneeID , srv .ID ) + "\n " +
199
- fmt .Sprintf ("primary IP v6 one has assignee id %d and should shouldnt be assigned to server id %d" ,
200
- primaryIPv6One .AssigneeID , srv .ID ))
194
+ // nolint:revive
195
+ return fmt .Errorf (`state is not as expected:
196
+ primary IP v4 two has assignee id %d which not equals target server id %d
197
+ primary IP v4 one has assignee id %d and should shouldnt be assigned to server id %d
198
+ primary IP v6 one has assignee id %d and should shouldnt be assigned to server id %d
199
+ ` ,
200
+ primaryIPv4Two .AssigneeID , srv .ID ,
201
+ primaryIPv4One .AssigneeID , srv .ID ,
202
+ primaryIPv6One .AssigneeID , srv .ID ,
203
+ )
201
204
}),
202
205
},
203
206
},
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ func Resource() *schema.Resource {
152
152
Optional : true ,
153
153
ValidateDiagFunc : func (i interface {}, path cty.Path ) diag.Diagnostics { // nolint:revive
154
154
if ok , err := hcloud .ValidateResourceLabels (i .(map [string ]interface {})); ! ok {
155
- return diag .Errorf (err . Error () )
155
+ return diag .FromErr (err )
156
156
}
157
157
return nil
158
158
},
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ func Resource() *schema.Resource {
55
55
Optional : true ,
56
56
ValidateDiagFunc : func (i interface {}, path cty.Path ) diag.Diagnostics { // nolint:revive
57
57
if ok , err := hcloud .ValidateResourceLabels (i .(map [string ]interface {})); ! ok {
58
- return diag .Errorf (err . Error () )
58
+ return diag .FromErr (err )
59
59
}
60
60
return nil
61
61
},
You can’t perform that action at this time.
0 commit comments