env NO_COLOR=1
! exec pint --no-color lint --min-severity=info 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="Checking Prometheus rules" entries=2 workers=10 online=true
Bug: query beyond configured retention (promql/range_query)
  ---> rules/0001.yaml:2 -> `Error Rate`
2 |   expr: sum(rate(errors[1h1s])) > 0.5
                     ^^^^^^^^^^^^
                     `errors[1h1s]` selector is trying to query Prometheus for 1h1s worth of metrics,
                     but 1h is the maximum allowed range query.

level=INFO msg="Problems found" Bug=1
level=ERROR msg="Execution completed with error(s)" err="found 1 problem(s) with severity Bug or higher"
-- rules/0001.yaml --
- alert: Error Rate
  expr: sum(rate(errors[1h1s])) > 0.5

- alert: Error Rate
  expr: sum(rate(errors[1h])) > 0.5

-- .pint.hcl --
parser {
  relaxed = [".*"]
}
rule {
  range_query {
    max      = "1h"
    severity = "bug"
  }
}
