Heavily opinionated pre-commit hooks I deem useful.
Hooks
Hook ID | Description |
---|---|
markdown-detect-nonref-links |
Detects non-ref links in Markdown |
rego-unsafe-boolean-comparison |
Detects unsafe boolean comparison in Rego. For fix, see harness/ |
dockerfile-multiline-cmds |
Detects suboptimal use of multiline commands in Dockerfiles |
Add this to your .pre-commit-config.yaml
:
- repo: https://github.com/p15r/pre-commit-hooks.git
rev: v0.3.0
hooks:
- id: markdown-detect-nonref-links
- id: rego-unsafe-boolean-comparison
- id: dockerfile-multiline-cmds
(run pre-commit autoupdate
for latest hooks)
- Use the
try-repo
command for fast feedback loop:
cd dummyrepo/
pre-commit try-repo ../pre-commit-hooks/ --verbose