diff --git a/pkg/analyze/text_analyze.go b/pkg/analyze/text_analyze.go index fbd17c7a5..a1ac61022 100644 --- a/pkg/analyze/text_analyze.go +++ b/pkg/analyze/text_analyze.go @@ -1,6 +1,7 @@ package analyzer import ( + "fmt" "path/filepath" "regexp" "strconv" @@ -215,7 +216,7 @@ func compareRegex(conditional string, foundMatches map[string]string) (bool, err } else { // all we can support is "=" and "==" and "===" for now if operator != "=" && operator != "==" && operator != "===" { - return false, errors.New("unexpected operator in regex comparator") + return false, fmt.Errorf("unexpected operator %q in regex comparator, cannot compare %q and %q", operator, foundValue, lookForValue) } return foundValue == lookForValue, nil