Skip to content

Commit

Permalink
tests/provider: Enable tfproviderlint R002 check (#12033)
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 authored Mar 10, 2020
1 parent 12461ea commit 4692793
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 @@ -69,6 +69,7 @@ lint:
-AT006 \
-AT007 \
-AT008 \
-R002 \
-R004 \
-R006 \
-R012 \
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 4692793

Please sign in to comment.