I feel like I saw this in the docs somewhere, but ...
# general
h
I feel like I saw this in the docs somewhere, but is there a way, kind of like a unit test, to make sure that
./pants tailor
doesn't have any changes it would want to apply?
h
yes,
./pants tailor --check
h
No, but I mean like I want to invoke that as part of the change process and warn people on commit when it has issues
I've been using
--check
heavily already and want to make sure it doesn't blow up with recommended changes as others start getting involved and expanding the scope of what gets built.
h
I don't think I follow - what do you mean as part of the change process? We recommend adding the specific line
./pants tailor --check
to your CI, but I think I'm not understanding
h
I think that's what I'm getting at. I guess I never inspected the exit code of
tailor
to know how that would be used to stop the build process.
👍 1
Looks like it's 0 if there are no changes needed
h
Yeah, it behaves like
lint
and
test
so that you can depend on it in CI
ditto
update-build-files
b
@hundreds-father-404 https://www.pantsbuild.org/docs/using-pants-in-ci doesn't mention the exit code. That could be a nice addition, and help clarify for the reader what the value is of the recommended settings.