Skip to content

Commit

Permalink
resource/aws_ses_receipt_rule: Fixes for tfproviderlint R002
Browse files Browse the repository at this point in the history
Reference: #9952

Remove pointer value dereferences, which can cause potential panics and are extraneous as `Set()` automatically handles pointer types including when `nil`.

Previously:

```
aws/resource_aws_ses_receipt_rule.go:450:19: R002: ResourceData.Set() pointer value dereference is extraneous
aws/resource_aws_ses_receipt_rule.go:452:24: R002: ResourceData.Set() pointer value dereference is extraneous
aws/resource_aws_ses_receipt_rule.go:453:22: R002: ResourceData.Set() pointer value dereference is extraneous
```

Output from acceptance testing:

```
--- PASS: TestAccAWSSESReceiptRule_actions (18.64s)
--- PASS: TestAccAWSSESReceiptRule_basic (19.07s)
--- PASS: TestAccAWSSESReceiptRule_order (22.13s)
--- PASS: TestAccAWSSESReceiptRule_s3Action (36.32s)
```
  • Loading branch information
bflad committed Feb 13, 2020
1 parent 0efdad0 commit 6213544
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aws/resource_aws_ses_receipt_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,10 +447,10 @@ func resourceAwsSesReceiptRuleRead(d *schema.ResourceData, meta interface{}) err
}
}

d.Set("enabled", *response.Rule.Enabled)
d.Set("enabled", response.Rule.Enabled)
d.Set("recipients", flattenStringList(response.Rule.Recipients))
d.Set("scan_enabled", *response.Rule.ScanEnabled)
d.Set("tls_policy", *response.Rule.TlsPolicy)
d.Set("scan_enabled", response.Rule.ScanEnabled)
d.Set("tls_policy", response.Rule.TlsPolicy)

addHeaderActionList := []map[string]interface{}{}
bounceActionList := []map[string]interface{}{}
Expand Down

0 comments on commit 6213544

Please sign in to comment.