pint.ok --no-color -l debug lint rules
! stdout .
cmp stderr stderr.txt

-- stderr.txt --
level=info msg="Loading configuration file" path=.pint.hcl
level=info msg="File parsed" path=rules/0001.yml rules=2
level=debug msg="Found recording rule" lines=4-5 path=rules/0001.yml record=colo:recording
level=debug msg="Configured checks for rule" enabled=["promql/syntax","alerts/for","alerts/comparison","alerts/template","promql/fragile","promql/regexp","promql/aggregate(job:true)"] path=rules/0001.yml rule=colo:recording
level=debug msg="Found alerting rule" alert=colo:alerting lines=7-8 path=rules/0001.yml
level=debug msg="Configured checks for rule" enabled=["promql/syntax","alerts/for","alerts/comparison","alerts/template","promql/fragile","promql/regexp"] path=rules/0001.yml rule=colo:alerting
rules/0001.yml:5: job label is required and should be preserved when aggregating "^.+$" rules, remove job from without() (promql/aggregate)
 5 |     expr: sum(foo) without(job)

rules/0001.yml:8: alert query doesn't have any condition, it will always fire if the metric exists (alerts/comparison)
 8 |     expr: sum(bar) without(job)

level=info msg="Problems found" Warning=2
-- rules/0001.yml --
groups:
- name: foo
  rules:
  - record: "colo:recording"
    expr: sum(foo) without(job)

  - alert: "colo:alerting"
    expr: sum(bar) without(job)

-- .pint.hcl --
rule {
    ignore {
        kind = "alerting"
    }
    aggregate ".+" {
        keep = [ "job" ]
    }
}
