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 --
level=INFO msg="Finding all rules to check" paths=["rules"]
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=ERROR msg="Fatal error" err="found 2 problem(s) with severity Warning or higher"
