Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/czlee/pre-commit-hooks
Additional pre-commit hooks
https://github.com/czlee/pre-commit-hooks
Last synced: 24 days ago
JSON representation
Additional pre-commit hooks
- Host: GitHub
- URL: https://github.com/czlee/pre-commit-hooks
- Owner: czlee
- License: mit
- Created: 2021-10-31T03:20:29.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-31T03:44:57.000Z (about 3 years ago)
- Last Synced: 2024-11-18T02:44:07.205Z (about 2 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Miscellaneous pre-commit hooks
==============================This repository contains miscellaneous hooks for [pre-commit](https://pre-commit.com/) that I couldn't find anywhere else.
At the moment there's just one hook. I'm not really planning on actively maintaining this repository, but putting it up in case it saves anyone else a bit of time.
Example entry in .pre-commit-config.yaml:
``` yaml
- repo: https://github.com/czlee/pre-commit-hooks
rev: v0.0.1
hooks:
- id: check-file-name-pattern
files: directory-to-check/.+
args:
- --pattern
- "[a-z0-9\\-]+.xml"
```Hooks available
---------------### `check-file-name-pattern`
Checks that file names match a given regex pattern.
You should specify a pattern using something like `args: ['--pattern=[a-z]+.xml']`. The default pattern is `.*`, which vacuously matches everything.