eval_string_op_non_string_rhs

Diagnostic `nanook::eval::string_op_non_string_rhs`

Summary

string operator requires string right-hand side

Help

operators like contains, is, like need a string or string-array RHS

Details

When this fires

A string operator (contains, is, like, matches, not) had a non-string RHS. These ops compare strings or string arrays only, so a number or numeric metric on the right won't fly.

What to check

If you meant numeric equality, swap is for == and use a numeric literal.

# broken
expr = "host.name is 5"
# fixed
expr = "host.name is \"web-5\""

See @/docs/nanook-expr.md for the operator-by-type matrix.