Skip to content

Commit cf5f234

Browse files
committed
refactor
Signed-off-by: Coleen Iona Quadros <coleen.quadros27@gmail.com>
1 parent 1a37070 commit cf5f234

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

inhibit/inhibit.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,11 @@ func (ih *Inhibitor) Mutes(lset model.LabelSet) bool {
192192
if len(r.Sources) > 0 {
193193
var inhibitorIDs []string
194194
for _, source := range r.Sources {
195-
if inhibitedByFP, eq := source.hasEqual(lset, source.SrcMatchers.Matches(lset), ruleStart, r.TargetMatchers); eq && !source.foundMatch {
196-
inhibitorIDs = append(inhibitorIDs, inhibitedByFP.String())
197-
source.foundMatch = true
195+
if !source.foundMatch {
196+
if inhibitedByFP, eq := source.hasEqual(lset, source.SrcMatchers.Matches(lset), ruleStart, r.TargetMatchers); eq {
197+
inhibitorIDs = append(inhibitorIDs, inhibitedByFP.String())
198+
source.foundMatch = true
199+
}
198200
} else {
199201
break
200202
}

0 commit comments

Comments
 (0)