Two part question for those who develop on mainlin...
# development
w
Two part question for those who develop on mainline pants: • Is there any appetite for a single alias that prepares the repo for upload? • As I'm horrible at naming things, can anyone bikeshed a good name (or names? Something like:
pants fix fmt lint check test --all-changed
Or maybe two:
foo = "fix fmt lint check --all-changed"
bar = "foo test --all-changed"
I was just updating some documentation and noticed that we call out to the pre-commit hook, instead of just, like, an alias that would not only check, but fix too
h
I like
green
as an alias for this
But that is entirely just me
w
I don't feel there is adequate semantic meaning. Something closer to "sanitize" which I still don't like, but maybe even "tidy"?
pants tidy
mend
maybe, if we're excluding testing 🤷
It's just for the mainline pants repo, for what it's worth - so not a user-centric change, so it's also something we can feel more comfortable changing if needed
b
oooh, bikesheds, gotta jump in. We use
local
as an alias for this in my work repos:
Copy code
[cli.alias]
local = "tailor update-build-files fmt lint check ::"
tidy
is nice, but could also be
pre-push-checks
or something descriptive. I agree with not including
test
with the default one because that'll often be pretty slow with the
--changed-dependents=transitive
, I imagine.
w
Thanks for the feedback, I was looking for something brief - and was staying away from pre-commit/pre-push as those are very much githook centric. It’s also not just checks, as we run fix/fmt - I hate naming
c
FWIW Internally we have
Copy code
[cli.alias]
green = "fmt fix lint check"
--since-main = "--changed-since=origin/main --changed-dependents=transitive"
We don't includ
test
because we rely on a tag scheme for those and I don't think there is a way to have one command with multiple goals where the tags vary per goal.
w
Maybe it’s just me, but
green
doesn’t resonate with me - it doesn’t feel like it’ll perform an action which might require manual intervention (e.g. fixing lints that can’t be auto-fixed)