Update model/rulefmt/rulefmt.go

Co-authored-by: Owen Williams <owen.williams@grafana.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
This commit is contained in:
Bartlomiej Plotka 2025-01-24 15:49:10 +00:00 committed by GitHub
parent 80d702afdc
commit bd0d9e7a0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -237,7 +237,7 @@ func (r *RuleNode) Validate() (nodes []WrappedError) {
// Disallow "{}" chars. // Disallow "{}" chars.
if strings.Contains(r.Record.Value, "{") || strings.Contains(r.Record.Value, "}") { if strings.Contains(r.Record.Value, "{") || strings.Contains(r.Record.Value, "}") {
nodes = append(nodes, WrappedError{ nodes = append(nodes, WrappedError{
err: fmt.Errorf("potential issue in the recording rule name; should it be in expr?: %s", r.Record.Value), err: fmt.Errorf("braces present in the recording rule name; should it be in expr?: %s", r.Record.Value),
node: &r.Record, node: &r.Record,
}) })
} }