mkdir testrepo
cd testrepo
exec git init --initial-branch=main .

cp ../src/.pint.hcl .
env GIT_AUTHOR_NAME=pint
env GIT_AUTHOR_EMAIL=pint@example.com
env GIT_COMMITTER_NAME=pint
env GIT_COMMITTER_EMAIL=pint@example.com
exec git add .
exec git commit -am 'import rules and config'

exec git checkout -b v1
cp ../src/a.yml a.yml
exec git add a.yml
exec git commit -am 'v1'

exec git checkout -b v2
cp ../src/b.yml b.yml
exec git add b.yml
exec git commit -am 'v2'

exec git checkout -b v3
exec git rm a.yml
exec git commit -am 'v3'

pint.error --no-color ci
! stdout .
cmp stderr ../stderr.txt

-- stderr.txt --
level=info msg="Loading configuration file" path=.pint.hcl
level=info msg="Problems found" Fatal=1
b.yml:2 Fatal: syntax error: unexpected identifier "bi" (promql/syntax)
 2 |   expr: sum(foo) bi()

level=fatal msg="Fatal error" error="problems found"
-- src/a.yml --
- record: rule1
  expr: sum(foo) bi()
-- src/b.yml --
- record: rule1
  expr: sum(foo) bi()
-- src/.pint.hcl --
ci {
  baseBranch = "main"
}
parser {
  relaxed = [".*"]
}
