Skip to content

Commit

Permalink
white space and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tizki committed Dec 5, 2023
1 parent e5a78bd commit d633f02
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion pkg/validator/expression.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@ func (h expressionSelectorsMatchesAnything) Validate(rule rulefmt.Rule, promethe
return errs
}

/********/
func newExpressionWithNoMetricName(paramsConfig yaml.Node) (Validator, error) {
params := struct{}{}
if err := paramsConfig.Decode(&params); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/validator/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var testCases = []struct {
promClient *prometheus.Client
expectedErrors int
}{
//hasLabels
// hasLabels
{name: "ruleHasExpectedLabel", validator: hasLabels{labels: []string{"foo", "foo2"}}, rule: rulefmt.Rule{Labels: map[string]string{"foo": "bar", "foo2": "bar2"}}, expectedErrors: 0},
{name: "ruleMissingExpectedLabel", validator: hasLabels{labels: []string{"foo", "foo2"}}, rule: rulefmt.Rule{Labels: map[string]string{"xxx": "yyy"}}, expectedErrors: 2},
{name: "ruleHasExpectedLabelInExpr", validator: hasLabels{labels: []string{"foo", "foo2"}, searchInExpr: true}, rule: rulefmt.Rule{Expr: "up{foo='bar', foo2='bar2'}"}, expectedErrors: 0},
Expand Down

0 comments on commit d633f02

Please sign in to comment.