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 {
2020 Version string
2121}
2222
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+
2340func TestIntegration (t * testing.T ) {
2441 cases := []struct {
2542 Name string
@@ -109,12 +126,12 @@ func TestIntegration(t *testing.T) {
109126 t .Fatal (err )
110127 }
111128
112- var want interface {}
129+ var want result
113130 if err := json .Unmarshal (rawWant , & want ); err != nil {
114131 t .Fatal (err )
115132 }
116133
117- var got interface {}
134+ var got result
118135 if err := json .Unmarshal (stdout .Bytes (), & got ); err != nil {
119136 t .Fatal (err )
120137 }
You can’t perform that action at this time.
0 commit comments