From a98be49c52358c17dce34d6235da616545cb5080 Mon Sep 17 00:00:00 2001 From: Mikael Johansson Date: Thu, 2 Jul 2020 12:09:01 +0200 Subject: [PATCH] Change rule index numbering from 0 to n+1 on errors found in rule files (#7495) * Change rule index numbering from 0 to n+1 on errors found in rule files Signed-off-by: Mikael Johansson --- pkg/rulefmt/rulefmt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/rulefmt/rulefmt.go b/pkg/rulefmt/rulefmt.go index 1d6716beb..899ab2738 100644 --- a/pkg/rulefmt/rulefmt.go +++ b/pkg/rulefmt/rulefmt.go @@ -90,7 +90,7 @@ func (g *RuleGroups) Validate(node ruleGroups) (errs []error) { } errs = append(errs, &Error{ Group: g.Name, - Rule: i, + Rule: i + 1, RuleName: ruleName.Value, Err: node, })