Skip to content

Commit

Permalink
cli: cover all possible skip paths to print it in the CLI output (#1765)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontesi authored Dec 22, 2023
1 parent f842869 commit 8b7ccb5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/checksdb/checksgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,13 @@ func (group *ChecksGroup) Add(check *Check) {

func skipCheck(check *Check, reason string) {
check.LogInfo("Skipping check %s, reason: %s", check.ID, reason)

check.SetResultSkipped(reason)
printCheckResult(check)
}

func skipAll(checks []*Check, reason string) {
for _, check := range checks {
skipCheck(check, reason)
printCheckResult(check)
}
}

Expand Down Expand Up @@ -308,7 +307,6 @@ func (group *ChecksGroup) RunChecks(labelsExpr string, stopChan <-chan bool, abo
for _, check := range group.checks {
if !labelsExprEvaluator.Eval(check.Labels) {
skipCheck(check, "no matching labels")
printCheckResult(check)
continue
}
checks = append(checks, check)
Expand Down

0 comments on commit 8b7ccb5

Please sign in to comment.