Skip to content

Commit 5e7943a

Browse files
committed
Add a comment for count, modified in AggregateBy
1 parent 39cf565 commit 5e7943a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/rules/rules.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ type RuleNamespace struct {
2222

2323
// AggregateBy Modifies the aggregation rules in groups to include a given Label.
2424
func (r RuleNamespace) AggregateBy(label string) (int, int, error) {
25+
// `count` represents the number of rules we evalated.
26+
// `mod` represents the number of rules we modified - a modification can either be a lint or adding the
27+
// label in the aggregation.
2528
var count, mod int
29+
2630
for i, group := range r.Groups {
2731
for j, rule := range group.Rules {
2832
log.WithFields(log.Fields{"rule": getRuleName(rule)}).Debugf("evaluating...")

0 commit comments

Comments
 (0)