PreCommitHookPlugin
PreCommitHookPlugin copied to clipboard
Detecting Python virtualenv
Is it possible to somehow detect virtualenv associated with a project in Pycharm? I'd like to run Pylint within pre-commit-hook.sh
without hardcoding the path to that linter or installing it globally. What would you recommend?
Hi @MateuszBelczowski, I believe you can parse .idea/misc.xml in your .sh file to know which SDK is used. (in the misc file only SDK name is specified, which can miss path information. In this case you can find path by SDK name in .idea/workspace.xml)