So, I was chatting with <@U01GFRYQ1TR> about incre...
# general
p
So, I was chatting with @busy-vase-39202 about incremental pants adoption in existing repos. The
skip_pylint
and
skip_*
parameters are really helpful, but I had to add them manually wherever I wanted to skip them. (PS -
skip_*
is a lifesaver. Thank you!!!) For existing projects that want to adopt pants incrementally, what if you could add a "skip by default" mode to
./pants taiilor
? Then, someone could go in and un-skip the tools in just one directory, and slowly increase the number of enabled directories until they've linted everything. Heck that would be a pretty cool way to adopt
black
and other tools more incrementally as well. That would give great flexibility for very small POC pants implementations in existing repos to show the value pants provides before adopting it in more and more of the repo until the entire repo can be covered by pants.
👍🏻 1
f
do you mean like a
tailor_ignore
config section, that could express a list of globs for
./pants tailor
to skip BUILD file generation on?
p
I'm thinking
tailor
can create the BUILD files, but it should add
skip_pylint
skip_black
skip_pytest
etc to all the targets it creates depending on which backend are enabled.
A config section could be helpful to tell it "auto include skips in targets under directories matching these patterns"
h
That sounds like an excellent idea!
And should be easy to do
I was having some thoughts this weekend about having a script to automatically set up Pants just for linting (since that is substantually easier than say running tests), so this could be part of that
What I would really like is to be able to remove
skip_
automatically when the target passes that lint...
So start with skip everywhere, and selectively, automatically remove it
p
Yes. Exactly!