Browse Source

Clarify error messaging, group names must be provided. (#7529)

Signed-off-by: Callum Styan <callumstyan@gmail.com>
pull/7541/head
Callum Styan 4 years ago committed by GitHub
parent
commit
0f76024eeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      pkg/rulefmt/rulefmt.go

2
pkg/rulefmt/rulefmt.go

@ -68,7 +68,7 @@ func (g *RuleGroups) Validate(node ruleGroups) (errs []error) {
for j, g := range g.Groups {
if g.Name == "" {
errs = append(errs, errors.Errorf("%d:%d: Groupname should not be empty", node.Groups[j].Line, node.Groups[j].Column))
errs = append(errs, errors.Errorf("%d:%d: Groupname must not be empty", node.Groups[j].Line, node.Groups[j].Column))
}
if _, ok := set[g.Name]; ok {

Loading…
Cancel
Save