Hey, is it possible to tell pants to ignore folder...
# general
e
Hey, is it possible to tell pants to ignore folders in the source tree and not look for build files there?
r
Hey! You can try the
--pants-ignore
flag. Here is an example:
Copy code
$ ./pants --pants-ignore='/testprojects/src/scala' list testprojects/src:: | grep scala
testprojects/src/java/org/pantsbuild/testproject/javadepsonscala:javadepsonscala
testprojects/src/java/org/pantsbuild/testproject/javadepsonscalatransitive:javadepsonscalatransitive
If we don’t use the flag:
Copy code
$ ./pants list testprojects/src:: | grep scala
testprojects/src/scala/org/pantsbuild/testproject/unicode:unicode
testprojects/src/scala/org/pantsbuild/testproject/emptyscala:emptyscala
testprojects/src/scala/org/pantsbuild/testproject/mutual:bin
testprojects/src/scala/org/pantsbuild/testproject/mutual:mutual
...
testprojects/src/scala/org/pantsbuild/testproject/thriftdeptest:thriftdeptest
e
Found that you can add this under [GLOBAL] in your pants.ini
Copy code
build_ignore: [
   "some/folder"
  ]
h
This is true for all options. Any option can be specified in pants.ini (under the suitable scope), on the cmd line or as an env var.