is there a way to tell pants to treat warnings as ...
# general
b
is there a way to tell pants to treat warnings as errors? in our CI/CD if a change introduces warnings I'd like the job to fail
c
which warnings? each tool pants runs has its own config. Some language backends have independent settings, such as the Python backend's unowned dependency behavior
b
in this case it was unmatched globs -- someone had copied a BUILD file including a
python_tests()
rule to a package that didn't have tests. They didn't catch it in CI/CD since the WARN lines aren't really obvious there; all the tests did pass.
c
probably unmatched build file globs setting is the one you'd want for that
👍🏾 1
b
so I'm inferring that I can turn these specific warnings into errors, but can't easily just say to exit with a nonzero if any warnings are emitted
c
yes, unfortunately. we don't have a global "default error behaviour" toggle (or even a list of all the places that have toggleable error behaviour). Although, that would be neat