How can I tell pants to ignore directories when do...
# general
m
How can I tell pants to ignore directories when doing
fmt
?
b
I think I asked about this earlier. AFAIK there's not top-level
fmt
"skip these". You'll have to/want to use the
skip_XYZ
options to
python_sources
and friends. Core devs can correct me if I'm wrong 🙂
👍 1
--pants-ignore
could help, but I assume you'll then be using it instead of the one in your toml file
f
@melodic-thailand-99227 some useful reading I’ve discovered myself recently 🙂 https://pantsbuild.slack.com/archives/C046T6T9U/p1636564914098300
h
Hmm, Pants does support exclusion globs (prefixed by a
!
) but it looks like we only support those in BUILD files, not on the cmd line. I wonder if we could add that support easily. @hundreds-father-404 thoughts? It would have to be used in a single-quoted string so the shell didn't attempt to interpret the
!
Looking at the specs parser code, it seems like this should work, will figure out why it doesn't
h
@happy-kitchen-89482 for command line specs? Yep, I want to add these very badly. Part of the CLI redesign I proposed last month but we de-prioritized
We could implement the
!
exclusions as prework. I'm itching to implement that whole proposal
h
@melodic-thailand-99227 is the purpose here to temporarily ignore some directories in a single run, say to save time, or is it that some directories do not (yet) pass lint and you don't want to fail on them? The
skip_lintername
target fields are for that latter case.
1