[Linting Differences between Pylint vs pants threa...
# development
w
[Linting Differences between Pylint vs pants thread]
Trying to move from pylint run against the entire repo into ./pants with v2
getting significantly different results b/w the two even with versioning andd config set. up
including a
too many similar lines
error between different targets. which based on my understanding of pants execution model should be impossible
w
Regarding the execution model: by default lint does not run per target because of the overheads of per-target runs. But you can toggle to that mode, and you'll get much better caching behavior and actual isolation
On my phone, will post a link shortly
w
cool that makes sense
although still not sure how running it with vanilla pylint across the entire repo doesn't turn up that error
makes me think my config either isn't loading properly or something else is going on
w
yup!
Copy code
[pylint]
version = "pylint==2.3.1"
config = ".pylintrc"
source_plugins = ["build-support/pylint:custom-linters"]
đź‘Ť 1
i know its at least loading it partially since it complained about the source_plugins until i added them to my
toml
đź‘Ť 1
w
Copy code
--[no-]lint-per-target-caching
  default: False
  Rather than running all targets in a single batch, run each target as a separate
  process. Why do this? You'll get many more cache hits. Why not do this? Linters
  both have substantial startup overhead and are cheap to add one additional file
  to the run. On a cold cache, it is much faster to use `--no-per-target-caching`.
  We only recommend using `--per-target-caching` if you are using a remote cache
  or if you have benchmarked that this option will be faster than `--no-per-
  target-caching` for your use case.
w
i'll play with this thanks
w
i don’t think we knew that pylint had any sort of “aggregate across all files in a target” behavior. good to know.
but yea, for a larger repo, you’ll almost certainly want to enable that.
h
i don’t think we knew that pylint had any sort of “aggregate across all files in a target” behavior.
Yeah, Pylint gives you a final score at the end of the run