From ffcbf5feb669f7663e38c7667dbd5c15e4cf0de9 Mon Sep 17 00:00:00 2001 From: Samuel Gaist <samuel.gaist@idiap.ch> Date: Mon, 14 Jan 2019 14:40:28 +0100 Subject: [PATCH] [pre-commit] Add sphinx local pre-commit hook This will run sphinx the same way as in the CI. --- .pre-commit-config.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bb2dfa1a..58dd6dca 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,3 +22,21 @@ repos: hooks: - id: bandit exclude: beat/editor/test + - repo: local + hooks: + - id: sphinx-build + name: sphinx build + entry: python -m sphinx.cmd.build + args: [-a, -E, -W, doc, sphinx] + language: system + files: ^doc/ + types: [file] + pass_filenames: false + - id: sphinx-doctest + name: sphinx doctest + entry: python -m sphinx.cmd.build + args: [-a, -E, -b, doctest, doc, sphinx] + language: system + files: ^doc/ + types: [file] + pass_filenames: false -- GitLab