Add pre-commit-sphinx to list of hook repositories#362
Conversation
|
I don't think the hook will work as written in general. sphinx usually needs access to your dependencies and won't have that access when run in pre-commit additionally, pre-commit hooks are intended to be as fast as possible, and also you've got a security problem here (shell injection) |
|
Thanks for the feedback @asottile :)
|
|
I guess more specifically you need to install the project under test to the same sphinx-build executable, which isn't a thing that pre-commit can do (by design) my guess is that a |
|
(I only had it in as I was copying and pasting over from an old build system.... better to get things working then gradually tidy). I'll fix the security issue by bypassing sphinx-build and calling sphinx directly from python, which will remove the need for |
I've added a hook for building documentation with sphinx, so that commits fail if they break documentation builds.