! 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
Fatal: This rule is not a valid Prometheus rule: `incomplete rule, no alert or record key`. (yaml/parse)
  ---> rules/0001.yml:8
 8 |   - expr: sum(foo)
     ^^^ This rule is not a valid Prometheus rule: `incomplete rule, no alert or record key`.

level=INFO msg="Problems found" Fatal=1
level=ERROR msg="Execution completed with error(s)" err="found 1 problem(s) with severity Bug or higher"
-- rules/0001.yml --
groups:
- name: foo
  rules:
  - record: "colo:test1"
    expr: sum(foo) without(job)
    labels:
      job: foo
  - expr: sum(foo)
    labels:
      job: foo
-- .pint.hcl --
rule {
    aggregate ".+" {
        keep = [ "job" ]
    }
}
