! exec pint --no-color lint rules
! stdout .
cmp stderr stderr.txt

-- stderr.txt --
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=INFO msg="Checking Prometheus rules" entries=2 workers=10 online=true
Bug: name not allowed (rule/name)
  ---> rules/01.yml:4 -> `foo`
4 |   - alert: foo
               ^^^ alerting rule name must match `^rec:.+$`.

level=INFO msg="Problems found" Bug=1
level=ERROR msg="Execution completed with error(s)" err="found 1 problem(s) with severity Bug or higher"
-- rules/01.yml --
groups:
- name: foo
  rules:
  - alert: foo
    expr: up == 0
  - alert: rec:foo
    expr: up == 0

-- .pint.hcl --
rule {
    name "rec:.+" {
        severity = "bug"
        comment  = "must use rec: prefix"
    }
}
