mirror of https://github.com/pulumi/pulumi.git
ed5706ddb9
govet includes a nilness linter that detects a few nil issues. This linter is not enabled by default in govet because the `go` tool does not want a dependency on the libraries necessary to implement this (golang/go#59714). Enable the nilness linter and fix the following issues found by it (commentary below each check mine): pkg/cmd/pulumi/new.go:283:9: nilness: impossible condition: nil != nil (govet) ^- the error was very likely supposed to be the `os.Remove` pkg/cmd/pulumi/new.go:633:10: nilness: impossible condition: nil != nil (govet) ^- same error checked on the previous line pkg/cmd/pulumi/preview.go:190:11: nilness: impossible condition: nil != nil (govet) ^- same error checked a few blocks above pkg/codegen/pcl/binder_component.go:101:64: nilness: nil dereference in dynamic method call (govet) ^- err is guaranteed nil pkg/codegen/pcl/binder_component.go:133:10: nilness: impossible condition: nil != nil (govet) ^- err is guaranteed nil sdk/go/auto/errors_test.go:374:34: nilness: nil dereference in index operation (govet) ^- this is intentional; I replaced it with a deliberate panic tests/integration/construct_component_methods_resources/testcomponent-go/random.go:30:10: nilness: impossible condition: non-nil == nil (govet) ^- args is rejected if it's nil |
||
---|---|---|
.. | ||
.gitignore | ||
PulumiPlugin.yaml | ||
main.go | ||
random.go |