Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Updated govet Checks #7992

Closed
2 tasks done
bflad opened this issue Mar 18, 2019 · 1 comment · Fixed by #7993
Closed
2 tasks done

Fix Updated govet Checks #7992

bflad opened this issue Mar 18, 2019 · 1 comment · Fixed by #7993
Assignees
Labels
provider Pertains to the provider itself, rather than any interaction with AWS. technical-debt Addresses areas of the codebase that need refactoring or redesign.
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented Mar 18, 2019

Description

golangci-lint has updated the govet tool, which is showing a few valid check failures, e.g.

aws/config_test.go:14:14: composites: `github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/aws-sdk-go-base.MockRequest` composite literal uses unkeyed fields (govet)
      Request: &awsbase.MockRequest{"POST", "/", "Action=DescribeAccountAttributes&" +
                ^
aws/config_test.go:16:15: composites: `github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/aws-sdk-go-base.MockResponse` composite literal uses unkeyed fields (govet)
      Response: &awsbase.MockResponse{200, test_ec2_describeAccountAttributes_response, "text/xml"},
                 ^
aws/resource_aws_db_instance.go:1549:10: nilness: impossible condition: nil != nil (govet)
    if err != nil {
           ^
aws/resource_aws_docdb_cluster_instance.go:461:10: nilness: impossible condition: nil != nil (govet)
    if err != nil {
           ^
aws/resource_aws_egress_only_internet_gateway.go:42:9: nilness: impossible condition: nil != nil (govet)
  if err != nil {
         ^
aws/resource_aws_emr_security_configuration_test.go:70:10: nilness: tautological condition: non-nil != nil (govet)
    if err != nil {
           ^
aws/resource_aws_gamelift_game_session_queue_test.go:60:9: nilness: impossible condition: nil != nil (govet)
  if err != nil {
         ^
aws/resource_aws_organizations_account_test.go:74:26: nilness: nil dereference in field selection (govet)
    if resp == nil && resp.Account != nil {
                           ^
aws/resource_aws_organizations_policy_test.go:108:26: nilness: nil dereference in field selection (govet)
    if resp == nil && resp.Policy != nil {
                           ^
aws/resource_aws_vpn_connection_test.go:229:11: nilness: tautological condition: non-nil != nil (govet)
      if err != nil {
             ^
aws/resource_aws_vpn_gateway_test.go:386:11: nilness: tautological condition: non-nil != nil (govet)
      if err != nil {
             ^

Action Items

  • Fix new govet failures
  • Re-run broken TravisCI builds
@bflad bflad added technical-debt Addresses areas of the codebase that need refactoring or redesign. provider Pertains to the provider itself, rather than any interaction with AWS. labels Mar 18, 2019
@bflad bflad self-assigned this Mar 18, 2019
bflad added a commit that referenced this issue Mar 18, 2019
@bflad bflad added this to the v2.3.0 milestone Mar 19, 2019
@ghost
Copy link

ghost commented Mar 31, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
provider Pertains to the provider itself, rather than any interaction with AWS. technical-debt Addresses areas of the codebase that need refactoring or redesign.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant