pulumi/pkg/codegen/schema
Fraser Waters ef7b123bba Don't return empty hcl.Diagnostics
Fixes https://github.com/pulumi/pulumi-terraform-bridge/issues/1201

hcl.Diagnostics implements the Error interface, but this means a list of
zero diagnostics still looks like a non-nil error, which throws of
normal "if err == nil" checks.

This changes a few use sites of hcl.Diagnostics to ensure we return nil
when there aren't any diagnostics rather than an empty slice. This
ensures if they get cast to `Error` they don't trip up standard `err ==
nil` checks.
2023-06-08 19:14:41 +01:00
..
bind.go Don't return empty hcl.Diagnostics 2023-06-08 19:14:41 +01:00
docs_parser.go golangci-lint: Enable staticcheck 2023-01-14 16:59:46 -08:00
docs_renderer.go all: Assert => Assertf 2023-03-03 14:37:43 -08:00
docs_test.go all: Fix revive issues 2023-03-21 08:55:11 -07:00
loader.go Hardcode some known provider plugin locations 2023-05-24 17:41:12 +01:00
loader_schema_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
loader_test.go all: Don't use cmdutil.Diag in tests 2023-03-13 12:54:04 -07:00
mock_pulumi_schema.go all: Assert => Assertf 2023-03-03 14:37:43 -08:00
package_reference.go all: Assert => Assertf 2023-03-03 14:37:43 -08:00
pulumi.json Don't set additionalProperties 2023-03-27 10:11:57 +01:00
schema.go Fix version number in typerefs when marshalling schemas 2023-05-24 08:16:20 +01:00
schema_test.go Fix version number in typerefs when marshalling schemas 2023-05-24 08:16:20 +01:00