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 @@ -11,6 +11,23 @@ import (
1111 "github.com/google/go-cmp/cmp"
1212)
1313
14+ type result struct {
15+ Issues []issue `json:"issues"`
16+ Errors []any `json:"errors"`
17+ }
18+
19+ type issue struct {
20+ Rule any `json:"rule"`
21+ Message any `json:"message"`
22+ Range any `json:"range"`
23+ Callers any `json:"callers"`
24+
25+ // The following fields are ignored because they are added in TFLint v0.59.1.
26+ // We can uncomment this once the minimum supported version is v0.59.1+.
27+ // Fixed any `json:"fixed"`
28+ // Fixable any `json:"fixable"`
29+ }
30+
1431func TestIntegration (t * testing.T ) {
1532 cases := []struct {
1633 Name string
@@ -43,12 +60,12 @@ func TestIntegration(t *testing.T) {
4360 t .Fatalf ("Failed `%s`: %s" , tc .Name , err )
4461 }
4562
46- var expected interface {}
63+ var expected result
4764 if err := json .Unmarshal (ret , & expected ); err != nil {
4865 t .Fatalf ("Failed `%s`: %s" , tc .Name , err )
4966 }
5067
51- var got interface {}
68+ var got result
5269 if err := json .Unmarshal (stdout .Bytes (), & got ); err != nil {
5370 t .Fatalf ("Failed `%s`: %s" , tc .Name , err )
5471 }
You can’t perform that action at this time.
0 commit comments