https://pantsbuild.org/ logo
#general
Title
# general
p

proud-dentist-22844

04/13/2021, 2:14 PM
Can I tell pants to only run pylint on a subset of targets? (eg ignore all
:tests
target files?)
e

enough-analyst-54434

04/13/2021, 2:15 PM
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

hundreds-father-404

04/13/2021, 4:17 PM
p

proud-dentist-22844

04/13/2021, 6:05 PM
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.
5 Views