File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,23 @@ type meta struct {
20
20
Version string
21
21
}
22
22
23
+ type result struct {
24
+ Issues []issue `json:"issues"`
25
+ Errors []any `json:"errors"`
26
+ }
27
+
28
+ type issue struct {
29
+ Rule any `json:"rule"`
30
+ Message any `json:"message"`
31
+ Range any `json:"range"`
32
+ Callers any `json:"callers"`
33
+
34
+ // The following fields are ignored because they are added in TFLint v0.59.1.
35
+ // We can uncomment this once the minimum supported version is v0.59.1+.
36
+ // Fixed any `json:"fixed"`
37
+ // Fixable any `json:"fixable"`
38
+ }
39
+
23
40
func TestIntegration (t * testing.T ) {
24
41
cases := []struct {
25
42
Name string
@@ -109,12 +126,12 @@ func TestIntegration(t *testing.T) {
109
126
t .Fatal (err )
110
127
}
111
128
112
- var want interface {}
129
+ var want result
113
130
if err := json .Unmarshal (rawWant , & want ); err != nil {
114
131
t .Fatal (err )
115
132
}
116
133
117
- var got interface {}
134
+ var got result
118
135
if err := json .Unmarshal (stdout .Bytes (), & got ); err != nil {
119
136
t .Fatal (err )
120
137
}
You can’t perform that action at this time.
0 commit comments