pint.ok -l debug --no-color -d alerts/for -d alerts/comparison -d promql/rate(prom) -d promql/series(prom) -d promql/aggregate(prom) -d promql/range_query lint rules
! stdout .
cmp stderr stderr.txt

-- stderr.txt --
level=info msg="Loading configuration file" path=.pint.hcl
level=debug msg="File parsed" path=rules/0001.yml rules=3
level=debug msg="Starting query workers" name=prom uri=http://127.0.0.1 workers=16
level=debug msg="Found alerting rule" alert=default-for lines=1-3 path=rules/0001.yml
level=debug msg="Configured checks for rule" enabled=["promql/syntax","alerts/template","promql/fragile","promql/regexp","promql/vector_matching(prom)","rule/duplicate(prom)","labels/conflict(prom)"] path=rules/0001.yml rule=default-for
level=debug msg="Found recording rule" lines=5-6 path=rules/0001.yml record=sum-job
level=debug msg="Configured checks for rule" enabled=["promql/syntax","alerts/template","promql/fragile","promql/regexp","promql/vector_matching(prom)","rule/duplicate(prom)","labels/conflict(prom)","promql/aggregate(job:true)"] path=rules/0001.yml rule=sum-job
level=debug msg="Found alerting rule" alert=no-comparison lines=8-9 path=rules/0001.yml
level=debug msg="Configured checks for rule" enabled=["promql/syntax","alerts/template","promql/fragile","promql/regexp","promql/vector_matching(prom)","rule/duplicate(prom)","labels/conflict(prom)"] path=rules/0001.yml rule=no-comparison
rules/0001.yml:6 Warning: job label is required and should be preserved when aggregating "^.+$" rules, use by(job, ...) (promql/aggregate)
 6 |   expr: sum(foo)

level=info msg="Problems found" Warning=1
level=debug msg="Stopping query workers" name=prom uri=http://127.0.0.1
-- rules/0001.yml --
- alert: default-for
  expr: foo > 1
  for: 0m

- record: sum-job
  expr: sum(foo)

- alert: no-comparison
  expr: foo

-- .pint.hcl --
parser {
  relaxed = [".*"]
}
prometheus "prom" {
  uri     = "http://127.0.0.1"
  timeout = "5s"
}
rule {
    match {
      kind = "recording"
    }
    aggregate ".+" {
        keep = [ "job" ]
    }
}
