Disclaimer! This is a public repo. Take care about what information and data you put here, since it will be viewable on the internet.
Place to store all of Tatari's custom pre-commit hooks.
Depending in which language your hook is written, you will need to commit your hook script in different locations:
- Python: python_hooks/
- Ensure you add any dependencies necessary for your hook by running
poetry add <dep>
followed bypoetry lock
- Ensure you add any dependencies necessary for your hook by running
- Bash: root of repo
Then define your hook in .pre-commit-hooks.yaml. Full format of hook definition can be found here.
Python example:
- id: python-example
name: python-example
description: Run a Python pre-commit hook
entry: poetry run python -m python_hooks.python_script.py
language: python
pass_filenames: false
Bash example:
- id: bash-example
name: bash-example
description: Run a Bash pre-commit hook
entry: bash-script.sh
language: system
pass_filenames: false
Adding hook definitions to your repo's .pre-commit-config.yaml
will add specific hooks from this repo to evaluate your code.
Example:
- repo: [email protected]:tatari-tv/pre-commit-hooks.git
rev: v0.1.0
hooks:
- id: poetry-pkg-dep-constraint-format