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
@@ -57,12 +74,12 @@ func TestIntegration(t *testing.T) {
5774 t .Fatalf ("Failed `%s`: %s" , tc .Name , err )
5875 }
5976
60- var expected interface {}
77+ var expected result
6178 if err := json .Unmarshal (ret , & expected ); err != nil {
6279 t .Fatalf ("Failed `%s`: %s" , tc .Name , err )
6380 }
6481
65- var got interface {}
82+ var got result
6683 if err := json .Unmarshal (stdout .Bytes (), & got ); err != nil {
6784 t .Fatalf ("Failed `%s`: %s" , tc .Name , err )
6885 }
You can’t perform that action at this time.
0 commit comments