pinterest / arcanist-linters

A collection of custom Arcanist linters
Apache License 2.0
63 stars 45 forks source link

Add virtualenv support for Python linters #38

Closed jparise closed 4 years ago

jparise commented 4 years ago

PythonExternalLinter is a new abstract base class for external Python-based linters. It introduces support for virtualenv-based tool installations. If a known virtualenv is found in the project root, and the linter binary can be found within it, then that path will be used to execute the linter. Otherwise, the linter binary is assumed to be in the $PATH.

The list of known virtualenvs defaults to .venv but can be changed using the python.virtualenvs configuration key.