exec pint --no-color -d 'promql/.*' -d alerts/count 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="Configured new Prometheus server" name=prom1 uris=1 uptime=up tags=[] include=[] exclude=["^rules/0002.yml$"]
level=INFO msg="Configured new Prometheus server" name=prom2 uris=1 uptime=up tags=[] include=[] exclude=["^rules/0001.yml$"]
level=INFO msg="Checking Prometheus rules" entries=8 workers=10 online=true
-- rules/0001.yml --
- record: "colo:duplicate"
  expr: sum(foo) without(job)
- record: "colo:labels:empty"
  expr: sum(foo) without(job)
- record: "colo:labels:mismatch"
  expr: sum(foo) without(job)
  labels:
    file: a
- record: "colo:labels:equal"
  expr: sum(foo) without(job)
  labels:
    same: yes

-- rules/0002.yml --
- record: "colo:duplicate"
  expr: sum(foo) without(job)
- record: "colo:labels:empty"
  expr: sum(foo) without(job)
  labels:
    empty: nope
- record: "colo:labels:mismatch"
  expr: sum(foo) without(job)
  labels:
    file: b
- record: "colo:labels:equal"
  expr: sum(foo) without(job)
  labels:
    same: yes

# pint file/disable rule/duplicate

-- .pint.hcl --
prometheus "prom1" {
  uri      = "http://127.0.0.1:7110/1"
  failover = []
  timeout  = "5s"
  required = true
  exclude  = ["rules/0002.yml"]
}
prometheus "prom2" {
  uri      = "http://127.0.0.1:7110/2"
  failover = []
  timeout  = "5s"
  required = true
  exclude  = ["rules/0001.yml"]
}
parser {
  relaxed = [".*"]
}
