Can I tell pants to only run pylint on a subset of...
# general
p
Can I tell pants to only run pylint on a subset of targets? (eg ignore all
:tests
target files?)
e
In a pipeline you can feed pants with
./pants filter ... | xargs ./pants lint
; otherwise you'd need to use
./pants --tag=+foo lint
and setup a bunch of
foo
target tags (or the inverse).
So:
./pants filter --target-type=-python_tests ::
should list all your non-tests.
h
p
Hmm. K. I’m comparing the current Makefile for StackStorm. They ran pylint on only a selection of files, so I was looking for a way to do the same by default. I want to completely eliminate the Makefile to simplify development and simplify CI, but I guess I can’t simplify it as far as I thought. To use the filter option, I would need some kind of wrapper to run
./pants lint --skip-pylint
and then skip everything else and just run pylint.