haystack/.pre-commit-config.yaml
Sara Zan e92ea4fccb
refactor: rename master into main in documentation and links (#3063)
* master->main

* revert master rename

* Revert change to sphinx link and rename master schema
2022-08-24 19:05:12 +02:00

35 lines
1.4 KiB
YAML

fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-ast # checks Python syntax
- id: check-json # checks JSON syntax
- id: check-yaml # checks YAML syntax
- id: check-toml # checks TOML syntax
#- id: end-of-file-fixer # checks there is a newline at the end of the file # FIXME: pydoc-markdown conflicts with this
#- id: trailing-whitespace # trims trailing whitespace # FIXME: pydoc-markdown conflicts with this
- id: check-merge-conflict # checks for no merge conflict strings
- id: check-shebang-scripts-are-executable # checks all shell scripts have executable permissions
- id: mixed-line-ending # normalizes line endings
- id: no-commit-to-branch # prevents committing to main
#- id: pretty-format-json # indents and sorts JSON files # FIXME: JSON schema generator conflicts with this
- repo: https://github.com/psf/black
rev: 22.6.0 # IMPORTANT: keep this aligned with the black version in pyproject.toml
hooks:
- id: black-jupyter
# These can fail if some dependencies are missing. Also untested on Windows.
- repo: local
hooks:
- id: pydoc-markdown
name: Update API documentation
entry: python .github/utils/pydoc-markdown.py
language: system
types: [python]
# TODO we can make mypy and pylint run at this stage too, once their execution gets normalized