Collection of git hooks for Yamale to be used with pre-commit framework
Step into the repository you want to have the pre-commit hooks installed and edit .pre-commit-config.yaml
:
repos:
- repo: https://github.com/k-ogawa-1988/yamale-pre-commit
rev: <VERSION> # Get the latest from: https://github.com/k-ogawa-1988/yamale-pre-commit/releases
hooks:
- id: yamale-validate
with options:
repos:
- repo: https://github.com/k-ogawa-1988/yamale-pre-commit
rev: <VERSION> # Get the latest from: https://github.com/k-ogawa-1988/yamale-pre-commit/releases
hooks:
- id: yamale-validate
args: # Describe below
- '--exclude=venv'
- '--exclude=node_modules'
After pre-commit hook has been installed you can run it manually on all files in the repository
pre-commit run -a
--schema=SCHEMA
-s=SCHEMA
File path of schema. Both absolute path and relative path can be accepted.--parser={pyyaml,ruamel}
-p={pyyaml,ruamel}
YAML library to load files. Choices are "ruamel" or "pyyaml" (default).--no-strict
Disable strict mode, unexpected elements in the data will be accepted.
PATH
(required)
Files to validate. Normally this argument are supplied from pre-commit.--debug
Output debug logs.
This repository is managed by Ken'ichi Ogawa.
Any forks or pull requests are welcome!
MIT licensed. See LICENSE for full details.