! 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=WARN msg="Failed to parse file content" err="did not find expected key" path=rules/bad.yaml line=4
level=INFO msg="Checking Prometheus rules" entries=2 workers=10 online=true
Fatal: did not find expected key (yaml/parse)
  ---> rules/bad.yaml:4
 4 | 
     ^^^ did not find expected key

Fatal: PromQL syntax error (promql/syntax)
  ---> rules/ok.yml:5 -> `sum:missing`
5 |     expr: sum(foo[5m)
                        ^ unclosed left bracket

level=INFO msg="Problems found" Fatal=2
level=ERROR msg="Execution completed with error(s)" err="found 2 problem(s) with severity Bug or higher"
-- rules/ok.yml --
groups:
- name: foo
  rules:
  - record: sum:missing
    expr: sum(foo[5m)

-- rules/bad.yaml --
xxx:
  xxx:
  xxx:

- xx
- yyy

-- .pint.hcl --
parser {
  relaxed = [".*"]
}
