R010

ResourcesStandard

check for (schema.ResourceData).GetChange assignment which should use (schema.ResourceData).Get

The R010 analyzer reports when (helper/schema.ResourceData).GetChange() assignments are not using the first return value (assigned to _), which should be replaced with (helper/schema.ResourceData).Get() instead.

Examples

_, n := d.GetChange("example")
n := d.Get("example")

Ignoring reports

Singular reports can be ignored by adding a //lintignore:R010 Go code comment at the end of the offending line or on the line immediately preceding, e.g.

//lintignore:R010
_, n := d.GetChange("example")

This page is generated from passes/R010/README.md, which lives beside the analyzer.