# Same as 0256 but without --show-duplicates, duplicates are collapsed.

exec pint --no-color 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="Checking Prometheus rules" entries=3 workers=10 online=true
Warning: always firing alert (alerts/comparison)
  ---> rules/rules.yml:2 -> `first` [+2 duplicates]
2 |   expr: &e up
               ^^
               This query doesn't have any condition and so this alert will always fire if it matches
               anything.

level=INFO msg="Some problems are duplicated between rules and all the duplicates were hidden, pass `--show-duplicates` to see them" total=3 duplicates=2 shown=1
level=INFO msg="Problems found" Warning=3
-- rules/rules.yml --
- alert: first
  expr: &e up
- alert: second
  expr: *e
- alert: third
  expr: up
-- .pint.hcl --
parser {
  relaxed = ["rules/.*"]
}
