Fixed typing of check results in statefiles (#101)

This PR also improves on the has_checks test by using some real data, ensuring that both the statefile and the plan files can be parsed correctly.
diff --git a/parse_test.go b/parse_test.go
index 137d475..79c9a66 100644
--- a/parse_test.go
+++ b/parse_test.go
@@ -31,12 +31,6 @@
 			continue
 		}
 
-		// Skip this directory as this is a unique test that only tests a subset
-		// of attributes for a plan. The fixture is not entirely valid, but that's okay.
-		if e.Name() == "has_checks" {
-			continue
-		}
-
 		t.Run(e.Name(), func(t *testing.T) {
 			expected, err := ioutil.ReadFile(filepath.Join(testFixtureDir, e.Name(), filename))
 			if err != nil {
diff --git a/state.go b/state.go
index 0f2a999..e533632 100644
--- a/state.go
+++ b/state.go
@@ -38,7 +38,7 @@
 
 	// Checks contains the results of any conditional checks when Values was
 	// last updated.
-	Checks *CheckResultStatic `json:"checks,omitempty"`
+	Checks []CheckResultStatic `json:"checks,omitempty"`
 }
 
 // UseJSONNumber controls whether the State will be decoded using the
diff --git a/testdata/has_checks/child_moodule/main.tf b/testdata/has_checks/child_moodule/main.tf
new file mode 100644
index 0000000..e961d4b
--- /dev/null
+++ b/testdata/has_checks/child_moodule/main.tf
@@ -0,0 +1,20 @@
+variable "file_names" {
+  type = set(string)
+  default = [
+    "file1.txt",
+  ]
+}
+
+resource "local_file" "foo" {
+  for_each = var.file_names
+  content  = "Hello, World!"
+  filename = each.value
+
+  lifecycle {
+    postcondition {
+      condition     = self.content == "Hello, World!"
+      error_message = "File content is not correct"
+    }
+  }
+}
+
diff --git a/testdata/has_checks/main.tf b/testdata/has_checks/main.tf
new file mode 100644
index 0000000..d121ed7
--- /dev/null
+++ b/testdata/has_checks/main.tf
@@ -0,0 +1,4 @@
+module "files" {
+  source     = "./child_module"
+  file_names = ["file1.txt", "file2.txt"]
+}
\ No newline at end of file
diff --git a/testdata/has_checks/plan.json b/testdata/has_checks/plan.json
index 4c45605..896e59b 100644
--- a/testdata/has_checks/plan.json
+++ b/testdata/has_checks/plan.json
@@ -1 +1 @@
-{"format_version":"1.1","terraform_version":"1.5.0","planned_values":{"root_module":{"resources":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_name":"registry.terraform.io/hashicorp/null","schema_version":0,"values":{"triggers":null},"sensitive_values":{}}]}},"resource_changes":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_name":"registry.terraform.io/hashicorp/null","change":{"actions":["create"],"before":null,"after":{"triggers":null},"after_unknown":{"id":true},"before_sensitive":false,"after_sensitive":{}}}],"configuration":{"provider_config":{"null":{"name":"null","full_name":"registry.terraform.io/hashicorp/null"}},"root_module":{"resources":[{"address":"null_resource.foo","mode":"managed","type":"null_resource","name":"foo","provider_config_key":"null","schema_version":0}]}},"checks":[{"//":"EXPERIMENTAL: see docs for details","address":{"kind":"resource","mode":"managed","module":"module.foo.module.bar","name":"this","to_display":"module.foo.module.bar.foobar.this","type":"foobar"},"status":"pass","instances":[{"address":{"instance_key":0,"module":"module.foo.module.bar","to_display":"module.foo.module.bar.foobar.this[0]"},"status":"pass"}]},{"//":"EXPERIMENTAL: see docs for details","address":{"kind":"resource","mode":"managed","module":"module.foo.module.bar","name":"this","to_display":"module.foo.module.bar.foobar.this","type":"foobar"},"status":"pass"}]}
+{"format_version":"1.2","terraform_version":"1.5.4","planned_values":{"root_module":{"child_modules":[{"resources":[{"address":"module.files.local_file.foo[\"file1.txt\"]","mode":"managed","type":"local_file","name":"foo","index":"file1.txt","provider_name":"registry.terraform.io/hashicorp/local","schema_version":0,"values":{"content":"Hello, World!","content_base64":null,"directory_permission":"0777","file_permission":"0777","filename":"file1.txt","sensitive_content":null,"source":null},"sensitive_values":{}},{"address":"module.files.local_file.foo[\"file2.txt\"]","mode":"managed","type":"local_file","name":"foo","index":"file2.txt","provider_name":"registry.terraform.io/hashicorp/local","schema_version":0,"values":{"content":"Hello, World!","content_base64":null,"directory_permission":"0777","file_permission":"0777","filename":"file2.txt","sensitive_content":null,"source":null},"sensitive_values":{}}],"address":"module.files"}]}},"resource_changes":[{"address":"module.files.local_file.foo[\"file1.txt\"]","module_address":"module.files","mode":"managed","type":"local_file","name":"foo","index":"file1.txt","provider_name":"registry.terraform.io/hashicorp/local","change":{"actions":["create"],"before":null,"after":{"content":"Hello, World!","content_base64":null,"directory_permission":"0777","file_permission":"0777","filename":"file1.txt","sensitive_content":null,"source":null},"after_unknown":{"content_base64sha256":true,"content_base64sha512":true,"content_md5":true,"content_sha1":true,"content_sha256":true,"content_sha512":true,"id":true},"before_sensitive":false,"after_sensitive":{"sensitive_content":true}}},{"address":"module.files.local_file.foo[\"file2.txt\"]","module_address":"module.files","mode":"managed","type":"local_file","name":"foo","index":"file2.txt","provider_name":"registry.terraform.io/hashicorp/local","change":{"actions":["create"],"before":null,"after":{"content":"Hello, World!","content_base64":null,"directory_permission":"0777","file_permission":"0777","filename":"file2.txt","sensitive_content":null,"source":null},"after_unknown":{"content_base64sha256":true,"content_base64sha512":true,"content_md5":true,"content_sha1":true,"content_sha256":true,"content_sha512":true,"id":true},"before_sensitive":false,"after_sensitive":{"sensitive_content":true}}}],"configuration":{"provider_config":{"module.files:local":{"name":"local","full_name":"registry.terraform.io/hashicorp/local","module_address":"module.files"}},"root_module":{"module_calls":{"files":{"source":"./child_module","expressions":{"file_names":{"constant_value":["file1.txt","file2.txt"]}},"module":{"resources":[{"address":"local_file.foo","mode":"managed","type":"local_file","name":"foo","provider_config_key":"module.files:local","expressions":{"content":{"constant_value":"Hello, World!"},"filename":{"references":["each.value"]}},"schema_version":0,"for_each_expression":{"references":["var.file_names"]}}],"variables":{"file_names":{"default":["file1.txt"]}}}}}}},"checks":[{"address":{"to_display":"module.files.local_file.foo","kind":"resource","module":"module.files","mode":"managed","type":"local_file","name":"foo"},"status":"pass","instances":[{"address":{"to_display":"module.files.local_file.foo[\"file1.txt\"]","module":"module.files","instance_key":"file1.txt"},"status":"pass"},{"address":{"to_display":"module.files.local_file.foo[\"file2.txt\"]","module":"module.files","instance_key":"file2.txt"},"status":"pass"}]}],"timestamp":"2023-08-30T10:38:39Z"}
diff --git a/testdata/has_checks/schemas.json b/testdata/has_checks/schemas.json
new file mode 100644
index 0000000..f6c7152
--- /dev/null
+++ b/testdata/has_checks/schemas.json
@@ -0,0 +1 @@
+{"format_version":"1.0","provider_schemas":{"registry.terraform.io/hashicorp/local":{"provider":{"version":0,"block":{"description_kind":"plain"}},"resource_schemas":{"local_file":{"version":0,"block":{"attributes":{"content":{"type":"string","description":"Content to store in the file, expected to be a UTF-8 encoded string.\n Conflicts with `sensitive_content`, `content_base64` and `source`.\n Exactly one of these four arguments must be specified.","description_kind":"plain","optional":true},"content_base64":{"type":"string","description":"Content to store in the file, expected to be binary encoded as base64 string.\n Conflicts with `content`, `sensitive_content` and `source`.\n Exactly one of these four arguments must be specified.","description_kind":"plain","optional":true},"content_base64sha256":{"type":"string","description":"Base64 encoded SHA256 checksum of file content.","description_kind":"plain","computed":true},"content_base64sha512":{"type":"string","description":"Base64 encoded SHA512 checksum of file content.","description_kind":"plain","computed":true},"content_md5":{"type":"string","description":"MD5 checksum of file content.","description_kind":"plain","computed":true},"content_sha1":{"type":"string","description":"SHA1 checksum of file content.","description_kind":"plain","computed":true},"content_sha256":{"type":"string","description":"SHA256 checksum of file content.","description_kind":"plain","computed":true},"content_sha512":{"type":"string","description":"SHA512 checksum of file content.","description_kind":"plain","computed":true},"directory_permission":{"type":"string","description":"Permissions to set for directories created (before umask), expressed as string in\n [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation).\n Default value is `\"0777\"`.","description_kind":"plain","optional":true,"computed":true},"file_permission":{"type":"string","description":"Permissions to set for the output file (before umask), expressed as string in\n [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation).\n Default value is `\"0777\"`.","description_kind":"plain","optional":true,"computed":true},"filename":{"type":"string","description":"The path to the file that will be created.\n Missing parent directories will be created.\n If the file already exists, it will be overridden with the given content.","description_kind":"plain","required":true},"id":{"type":"string","description":"The hexadecimal encoding of the SHA1 checksum of the file content.","description_kind":"plain","computed":true},"sensitive_content":{"type":"string","description":"Sensitive content to store in the file, expected to be an UTF-8 encoded string.\n Will not be displayed in diffs.\n Conflicts with `content`, `content_base64` and `source`.\n Exactly one of these four arguments must be specified.\n If in need to use _sensitive_ content, please use the [`local_sensitive_file`](./sensitive_file.html)\n resource instead.","description_kind":"plain","deprecated":true,"optional":true,"sensitive":true},"source":{"type":"string","description":"Path to file to use as source for the one we are creating.\n Conflicts with `content`, `sensitive_content` and `content_base64`.\n Exactly one of these four arguments must be specified.","description_kind":"plain","optional":true}},"description":"Generates a local file with the given content.","description_kind":"plain"}},"local_sensitive_file":{"version":0,"block":{"attributes":{"content":{"type":"string","description":"Sensitive Content to store in the file, expected to be a UTF-8 encoded string.\n Conflicts with `content_base64` and `source`.\n Exactly one of these three arguments must be specified.","description_kind":"plain","optional":true,"sensitive":true},"content_base64":{"type":"string","description":"Sensitive Content to store in the file, expected to be binary encoded as base64 string.\n Conflicts with `content` and `source`.\n Exactly one of these three arguments must be specified.","description_kind":"plain","optional":true,"sensitive":true},"content_base64sha256":{"type":"string","description":"Base64 encoded SHA256 checksum of file content.","description_kind":"plain","computed":true},"content_base64sha512":{"type":"string","description":"Base64 encoded SHA512 checksum of file content.","description_kind":"plain","computed":true},"content_md5":{"type":"string","description":"MD5 checksum of file content.","description_kind":"plain","computed":true},"content_sha1":{"type":"string","description":"SHA1 checksum of file content.","description_kind":"plain","computed":true},"content_sha256":{"type":"string","description":"SHA256 checksum of file content.","description_kind":"plain","computed":true},"content_sha512":{"type":"string","description":"SHA512 checksum of file content.","description_kind":"plain","computed":true},"directory_permission":{"type":"string","description":"Permissions to set for directories created (before umask), expressed as string in\n [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation).\n Default value is `\"0700\"`.","description_kind":"plain","optional":true,"computed":true},"file_permission":{"type":"string","description":"Permissions to set for the output file (before umask), expressed as string in\n [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation).\n Default value is `\"0700\"`.","description_kind":"plain","optional":true,"computed":true},"filename":{"type":"string","description":"The path to the file that will be created.\n Missing parent directories will be created.\n If the file already exists, it will be overridden with the given content.","description_kind":"plain","required":true},"id":{"type":"string","description":"The hexadecimal encoding of the SHA1 checksum of the file content.","description_kind":"plain","computed":true},"source":{"type":"string","description":"Path to file to use as source for the one we are creating.\n Conflicts with `content` and `content_base64`.\n Exactly one of these three arguments must be specified.","description_kind":"plain","optional":true}},"description":"Generates a local file with the given sensitive content.","description_kind":"plain"}}},"data_source_schemas":{"local_file":{"version":0,"block":{"attributes":{"content":{"type":"string","description":"Raw content of the file that was read, as UTF-8 encoded string. Files that do not contain UTF-8 text will have invalid UTF-8 sequences in `content`\n  replaced with the Unicode replacement character. ","description_kind":"plain","computed":true},"content_base64":{"type":"string","description":"Base64 encoded version of the file content (use this when dealing with binary data).","description_kind":"plain","computed":true},"content_base64sha256":{"type":"string","description":"Base64 encoded SHA256 checksum of file content.","description_kind":"plain","computed":true},"content_base64sha512":{"type":"string","description":"Base64 encoded SHA512 checksum of file content.","description_kind":"plain","computed":true},"content_md5":{"type":"string","description":"MD5 checksum of file content.","description_kind":"plain","computed":true},"content_sha1":{"type":"string","description":"SHA1 checksum of file content.","description_kind":"plain","computed":true},"content_sha256":{"type":"string","description":"SHA256 checksum of file content.","description_kind":"plain","computed":true},"content_sha512":{"type":"string","description":"SHA512 checksum of file content.","description_kind":"plain","computed":true},"filename":{"type":"string","description":"Path to the file that will be read. The data source will return an error if the file does not exist.","description_kind":"plain","required":true},"id":{"type":"string","description":"The hexadecimal encoding of the SHA1 checksum of the file content.","description_kind":"plain","computed":true}},"description":"Reads a file from the local filesystem.","description_kind":"plain"}},"local_sensitive_file":{"version":0,"block":{"attributes":{"content":{"type":"string","description":"Raw content of the file that was read, as UTF-8 encoded string. Files that do not contain UTF-8 text will have invalid UTF-8 sequences in `content`\n  replaced with the Unicode replacement character.","description_kind":"plain","computed":true,"sensitive":true},"content_base64":{"type":"string","description":"Base64 encoded version of the file content (use this when dealing with binary data).","description_kind":"plain","computed":true,"sensitive":true},"content_base64sha256":{"type":"string","description":"Base64 encoded SHA256 checksum of file content.","description_kind":"plain","computed":true},"content_base64sha512":{"type":"string","description":"Base64 encoded SHA512 checksum of file content.","description_kind":"plain","computed":true},"content_md5":{"type":"string","description":"MD5 checksum of file content.","description_kind":"plain","computed":true},"content_sha1":{"type":"string","description":"SHA1 checksum of file content.","description_kind":"plain","computed":true},"content_sha256":{"type":"string","description":"SHA256 checksum of file content.","description_kind":"plain","computed":true},"content_sha512":{"type":"string","description":"SHA512 checksum of file content.","description_kind":"plain","computed":true},"filename":{"type":"string","description":"Path to the file that will be read. The data source will return an error if the file does not exist.","description_kind":"plain","required":true},"id":{"type":"string","description":"The hexadecimal encoding of the SHA1 checksum of the file content.","description_kind":"plain","computed":true}},"description":"Reads a file that contains sensitive data, from the local filesystem.","description_kind":"plain"}}}}}}
diff --git a/testdata/has_checks/state.json b/testdata/has_checks/state.json
new file mode 100644
index 0000000..ac4378f
--- /dev/null
+++ b/testdata/has_checks/state.json
@@ -0,0 +1 @@
+{"format_version":"1.0","terraform_version":"1.5.4","values":{"root_module":{"child_modules":[{"resources":[{"address":"module.files.local_file.foo[\"file1.txt\"]","mode":"managed","type":"local_file","name":"foo","index":"file1.txt","provider_name":"registry.terraform.io/hashicorp/local","schema_version":0,"values":{"content":"Hello, World!","content_base64":null,"content_base64sha256":"3/1gIbsr1bCvZ2KQgJ7DpTGR3YHH9wpLKGiKNiGCmG8=","content_base64sha512":"N015SpXNz9izWZMYX++bo2jxYNja9DLQi6nx7R5avmzGkpHg+i/gAGpSVw7xjBne9OYXwzzlLvCm5fvjGMsDhw==","content_md5":"65a8e27d8879283831b664bd8b7f0ad4","content_sha1":"0a0a9f2a6772942557ab5355d76af442f8f65e01","content_sha256":"dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986f","content_sha512":"374d794a95cdcfd8b35993185fef9ba368f160d8daf432d08ba9f1ed1e5abe6cc69291e0fa2fe0006a52570ef18c19def4e617c33ce52ef0a6e5fbe318cb0387","directory_permission":"0777","file_permission":"0777","filename":"file1.txt","id":"0a0a9f2a6772942557ab5355d76af442f8f65e01","sensitive_content":null,"source":null},"sensitive_values":{"sensitive_content":true}},{"address":"module.files.local_file.foo[\"file2.txt\"]","mode":"managed","type":"local_file","name":"foo","index":"file2.txt","provider_name":"registry.terraform.io/hashicorp/local","schema_version":0,"values":{"content":"Hello, World!","content_base64":null,"content_base64sha256":"3/1gIbsr1bCvZ2KQgJ7DpTGR3YHH9wpLKGiKNiGCmG8=","content_base64sha512":"N015SpXNz9izWZMYX++bo2jxYNja9DLQi6nx7R5avmzGkpHg+i/gAGpSVw7xjBne9OYXwzzlLvCm5fvjGMsDhw==","content_md5":"65a8e27d8879283831b664bd8b7f0ad4","content_sha1":"0a0a9f2a6772942557ab5355d76af442f8f65e01","content_sha256":"dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986f","content_sha512":"374d794a95cdcfd8b35993185fef9ba368f160d8daf432d08ba9f1ed1e5abe6cc69291e0fa2fe0006a52570ef18c19def4e617c33ce52ef0a6e5fbe318cb0387","directory_permission":"0777","file_permission":"0777","filename":"file2.txt","id":"0a0a9f2a6772942557ab5355d76af442f8f65e01","sensitive_content":null,"source":null},"sensitive_values":{"sensitive_content":true}}],"address":"module.files"}]}},"checks":[{"address":{"to_display":"module.files.local_file.foo","kind":"resource","module":"module.files","mode":"managed","type":"local_file","name":"foo"},"status":"pass","instances":[{"address":{"to_display":"module.files.local_file.foo[\"file1.txt\"]","module":"module.files","instance_key":"file1.txt"},"status":"pass"},{"address":{"to_display":"module.files.local_file.foo[\"file2.txt\"]","module":"module.files","instance_key":"file2.txt"},"status":"pass"}]}]}