Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests/provider: Fix and enable AWS SDK Go pointer conversion linting …
…(T-W resources) (#18353) Reference: #12992 Previously: ``` aws/resource_aws_transfer_ssh_key.go severity:warning rule:prefer-aws-go-sdk-pointer-conversion-assignment: Prefer AWS Go SDK pointer conversion functions for dereferencing during assignment, e.g. aws.StringValue() 101: body = *s.SshPublicKeyBody -------------------------------------------------------------------------------- severity:warning rule:prefer-aws-go-sdk-pointer-conversion-conditional: Prefer AWS Go SDK pointer conversion functions for dereferencing during conditionals, e.g. aws.StringValue() 100: if sshKeyID == *s.SshPublicKeyId { aws/resource_aws_volume_attachment.go severity:warning rule:prefer-aws-go-sdk-pointer-conversion-conditional: Prefer AWS Go SDK pointer conversion functions for dereferencing during conditionals, e.g. aws.StringValue() 179: if a.InstanceId != nil && *a.InstanceId == instanceID { -------------------------------------------------------------------------------- 215: if len(vols.Volumes) == 0 || *vols.Volumes[0].State == ec2.VolumeStateAvailable { aws/resource_aws_vpc.go severity:warning rule:prefer-aws-go-sdk-pointer-conversion-assignment: Prefer AWS Go SDK pointer conversion functions for dereferencing during assignment, e.g. aws.StringValue() 339: classiclink_enabled = *v.ClassicLinkEnabled -------------------------------------------------------------------------------- 364: classiclinkdns_enabled = *v.ClassicLinkDnsSupported -------------------------------------------------------------------------------- severity:warning rule:prefer-aws-go-sdk-pointer-conversion-conditional: Prefer AWS Go SDK pointer conversion functions for dereferencing during conditionals, e.g. aws.StringValue() 337: if *v.VpcId == vpcid { -------------------------------------------------------------------------------- 362: if *v.VpcId == vpcid { aws/resource_aws_vpc_peering_connection.go severity:warning rule:prefer-aws-go-sdk-pointer-conversion-conditional: Prefer AWS Go SDK pointer conversion functions for dereferencing during conditionals, e.g. aws.StringValue() 146: if (client.accountid == *pc.AccepterVpcInfo.OwnerId) && (client.accountid != *pc.RequesterVpcInfo.OwnerId) { -------------------------------------------------------------------------------- 146: if (client.accountid == *pc.AccepterVpcInfo.OwnerId) && (client.accountid != *pc.RequesterVpcInfo.OwnerId) { aws/resource_aws_vpn_connection_route.go severity:warning rule:prefer-aws-go-sdk-pointer-conversion-conditional: Prefer AWS Go SDK pointer conversion functions for dereferencing during conditionals, e.g. aws.StringValue() 158: if *r.DestinationCidrBlock == cidrBlock && *r.State != "deleted" { -------------------------------------------------------------------------------- 158: if *r.DestinationCidrBlock == cidrBlock && *r.State != "deleted" { aws/resource_aws_vpn_gateway_route_propagation.go severity:warning rule:prefer-aws-go-sdk-pointer-conversion-conditional: Prefer AWS Go SDK pointer conversion functions for dereferencing during conditionals, e.g. aws.StringValue() 90: if *vgw.GatewayId == gwID { aws/resource_aws_waf_sql_injection_match_set.go severity:warning rule:prefer-aws-go-sdk-pointer-conversion-assignment: Prefer AWS Go SDK pointer conversion functions for dereferencing during assignment, e.g. aws.StringValue() 179: m["text_transformation"] = *t.TextTransformation aws/resource_aws_wafregional_rule.go severity:warning rule:prefer-aws-go-sdk-pointer-conversion-assignment: Prefer AWS Go SDK pointer conversion functions for dereferencing during assignment, e.g. aws.StringValue() 228: m["negated"] = *p.Negated -------------------------------------------------------------------------------- 229: m["type"] = *p.Type -------------------------------------------------------------------------------- 230: m["data_id"] = *p.DataId aws/resource_aws_workspaces_ip_group.go severity:warning rule:prefer-aws-go-sdk-pointer-conversion-assignment: Prefer AWS Go SDK pointer conversion functions for dereferencing during assignment, e.g. aws.StringValue() 219: r["description"] = *rule.RuleDesc ran 15 rules on 2163 files: 18 findings ``` Output from acceptance testing: ``` --- PASS: TestAccAWSTransferSshKey_basic (172.65s) --- PASS: TestAccAWSVolumeAttachment_attachStopped (379.45s) --- PASS: TestAccAWSVolumeAttachment_basic (137.33s) --- PASS: TestAccAWSVolumeAttachment_disappears (127.64s) --- PASS: TestAccAWSVolumeAttachment_skipDestroy (106.70s) --- PASS: TestAccAWSVolumeAttachment_update (117.94s) --- PASS: TestAccAWSVpc_AssignGeneratedIpv6CidrBlock (96.85s) --- PASS: TestAccAWSVpc_basic (35.87s) --- PASS: TestAccAWSVpc_bothDnsOptionsSet (45.41s) --- PASS: TestAccAWSVpc_classiclinkDnsSupportOptionSet (39.09s) --- PASS: TestAccAWSVpc_classiclinkOptionSet (38.76s) --- PASS: TestAccAWSVpc_coreMismatchedDiffs (30.39s) --- PASS: TestAccAWSVpc_defaultAndIgnoreTags (69.04s) --- PASS: TestAccAWSVpc_defaultTags_providerAndResource_duplicateTag (5.12s) --- PASS: TestAccAWSVpc_defaultTags_providerAndResource_nonOverlappingTag (74.60s) --- PASS: TestAccAWSVpc_defaultTags_providerAndResource_overlappingTag (77.40s) --- PASS: TestAccAWSVpc_defaultTags_providerOnly (74.67s) --- PASS: TestAccAWSVpc_defaultTags_updateToProviderOnly (53.56s) --- PASS: TestAccAWSVpc_defaultTags_updateToResourceOnly (54.07s) --- PASS: TestAccAWSVpc_DisabledDnsSupport (44.39s) --- PASS: TestAccAWSVpc_disappears (21.95s) --- PASS: TestAccAWSVpc_ignoreTags (69.04s) --- PASS: TestAccAWSVpc_tags (79.06s) --- PASS: TestAccAWSVpc_Tenancy (77.06s) --- PASS: TestAccAWSVpc_update (58.54s) --- FAIL: TestAccAWSVPCPeeringConnection_region (39.86s) # #18348 --- PASS: TestAccAWSVPCPeeringConnection_accept (81.01s) --- PASS: TestAccAWSVPCPeeringConnection_basic (43.58s) --- PASS: TestAccAWSVPCPeeringConnection_failedState (18.09s) --- PASS: TestAccAWSVPCPeeringConnection_options (78.71s) --- PASS: TestAccAWSVPCPeeringConnection_optionsNoAutoAccept (30.00s) --- PASS: TestAccAWSVPCPeeringConnection_peerRegionAutoAccept (16.39s) --- PASS: TestAccAWSVPCPeeringConnection_plan (31.03s) --- PASS: TestAccAWSVPCPeeringConnection_tags (85.86s) --- PASS: TestAccAWSVpnConnectionRoute_basic (457.75s) --- PASS: TestAccAWSVPNGatewayRoutePropagation_basic (55.88s) --- PASS: TestAccAWSWafRegionalRule_basic (61.65s) --- PASS: TestAccAWSWafRegionalRule_changeNameForceNew (107.77s) --- PASS: TestAccAWSWafRegionalRule_changePredicates (103.24s) --- PASS: TestAccAWSWafRegionalRule_disappears (64.90s) --- PASS: TestAccAWSWafRegionalRule_noPredicates (44.78s) --- PASS: TestAccAWSWafRegionalRule_tags (97.70s) --- PASS: TestAccAWSWafSqlInjectionMatchSet_basic (21.90s) --- PASS: TestAccAWSWafSqlInjectionMatchSet_changeNameForceNew (38.62s) --- PASS: TestAccAWSWafSqlInjectionMatchSet_changeTuples (35.26s) --- PASS: TestAccAWSWafSqlInjectionMatchSet_disappears (16.76s) --- PASS: TestAccAWSWafSqlInjectionMatchSet_noTuples (20.81s) --- FAIL: TestAccAwsWorkspacesIpGroup_MultipleDirectories (612.05s) # #18352 --- PASS: TestAccAwsWorkspacesIpGroup_basic (44.84s) --- PASS: TestAccAwsWorkspacesIpGroup_disappears (24.70s) --- PASS: TestAccAwsWorkspacesIpGroup_tags (69.57s) ```
- Loading branch information