From 9b94b3b90bd5b21f8fcbd4c3bef9ce653f61efc0 Mon Sep 17 00:00:00 2001 From: Owen Rumney Date: Wed, 28 Jul 2021 09:41:44 +0100 Subject: [PATCH] When WithAttribute is used, update Location (#965) --- pkg/result/result.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/result/result.go b/pkg/result/result.go index 3c1fc70275..0b94140e62 100644 --- a/pkg/result/result.go +++ b/pkg/result/result.go @@ -183,5 +183,6 @@ func (r *Result) WithAttribute(attr block.Attribute) *Result { } r.RangeAnnotation = fmt.Sprintf("%s: %s", typeStr, raw) + r.Location = r.Range() return r }