The R005 analyzer reports when multiple HasChange()
calls in a conditional can be combined into a single HasChanges()
call.
if d.HasChange("attr1") || d.HasChange("attr2") {
// handle attr1 and attr2 changes
}
if d.HasChanges("attr1", "attr2") {
// handle attr1 and attr2 changes
}
Singular reports can be ignored by adding the a //lintignore:R005
Go code comment at the end of the offending line or on the line immediately proceding, e.g.
//lintignore:R005
if d.HasChange("attr1") || d.HasChange("attr2") {
// handle attr1 and attr2 changes
}