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

-- stderr.txt --
level=info msg="Loading configuration file" [36mpath=[0m.pint.hcl
level=info msg="File parsed" [36mpath=[0mrules/0001.yml [36mrules=[0m2
level=debug msg="Found recording rule" [36mlines=[0m1-2 [36mpath=[0mrules/0001.yml [36mrecord=[0mcolo:recording
level=debug msg="Configured checks for rule" [36menabled=[0m["promql/syntax","promql/without(job:true)","promql/by(job:true)"] [36mpath=[0mrules/0001.yml [36mrule=[0mcolo:recording
level=debug msg="Found alerting rule" [36malert=[0mcolo:alerting [36mlines=[0m4-5 [36mpath=[0mrules/0001.yml
level=debug msg="Configured checks for rule" [36menabled=[0m["promql/syntax"] [36mpath=[0mrules/0001.yml [36mrule=[0mcolo:alerting
rules/0001.yml:2: job label is required and should be preserved when aggregating "^.+$" rules, remove job from without() (promql/without)
  expr: sum(foo) without(job)

-- rules/0001.yml --
- 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" ]
    }
}
