Skip to content

Commit

Permalink
tests/provider: Enable tfproviderlint R002 check
Browse files Browse the repository at this point in the history
Reference: #9952

Previously:

```
aws/resource_aws_sns_platform_application.go:230:18: R002: ResourceData.Set() pointer value dereference is extraneous
```

We are unable to acceptance test the `aws_sns_platform_application` resource as it requires an active Apple Developer subscription and application, however this final refactor is trivial.
  • Loading branch information
bflad committed Feb 13, 2020
1 parent 0efdad0 commit 16f2e5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ lint:
-AT002 \
-AT006 \
-AT007 \
-R002 \
-R004 \
-S001 \
-S002 \
Expand Down
4 changes: 2 additions & 2 deletions aws/resource_aws_sns_platform_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ func resourceAwsSnsPlatformApplicationRead(d *schema.ResourceData, meta interfac
// Some of the fetched attributes are stateful properties such as
// the number of subscriptions, the owner, etc. skip those
if resource.Schema[iKey] != nil {
value := *attrmap[oKey]
value := aws.StringValue(attrmap[oKey])
log.Printf("[DEBUG] Updating %s => %s -> %s", iKey, oKey, value)
d.Set(iKey, *attrmap[oKey])
d.Set(iKey, value)
}
}
}
Expand Down

0 comments on commit 16f2e5b

Please sign in to comment.