pint.error --no-color lint --fail-on=warning rules
! stdout .
cmp stderr stderr.txt

-- rules/0001.yml --
groups:
  - name: foo
    rules:
    - alert: foo
      expr: up{job=~"xxx"}

-- stderr.txt --
rules/0001.yml:5 Warning: alert query doesn't have any condition, it will always fire if the metric exists (alerts/comparison)
 5 |       expr: up{job=~"xxx"}

rules/0001.yml:5 Bug: unnecessary regexp match on static string job=~"xxx", use job="xxx" instead (promql/regexp)
 5 |       expr: up{job=~"xxx"}

level=info msg="Problems found" Bug=1 Warning=1
level=fatal msg="Fatal error" error="found 2 problem(s) with severity Warning or higher"
