Is there a way to skip linting/formatting an entir...
# general
w
Is there a way to skip linting/formatting an entire source-root's worth of targets? For example, I have a
deps
folder where I place my 3rd party dependencies. I don't want any of them to be touched or linted. I know I can skip on a per-target, or skip per-target, where that target has a glob,
--filter-address-regex
might be what you want
you can prefix the regex with
-
to exclude targets
so operate on
::
but with a negative filter to remove the source root at issue
I know I can skip on a per-target, or skip per-target, where that target has a glob,
sorry missed that part
could you use
__defaults__
to set a skip flag for the entire subtree?
w
Ahh, interesting. A bit of a kludge though. I assumed there was a
pants.toml
option because this seems to be a pretty "obvious" use case for 3rd party deps. I was wondering if
__defaults__
would come into play, but aren't they 2.14?
f
I don't recall when they were added. I work on
main
mostly ... 🙂
w
🙂 I'll look around a bit more - a glob for me in this case is just as good, so I'm not too worried, but I definitely don't want the entire nordic embedded SDK touched when I run this kinda stuff, basically like node_modules at that point
b
You're right about dunder defaults working here, and about 2.14
h
yeah it's 2.14, which we are now on an rc and it'd be great to stabilize in the next ~2 weeks
w
The
__defaults__
operate on the targets all the way up the directory structure?
b
down the dir structure "here and all my descendants"
👍 1
w
Targets all the way down... Sweet! I'll give it a shot - it's a C++ project, and we don't technically support 3rd party yet, BUT, my formatter was wreaking havoc on my repo
❤️ 1