pre-commit: add basic hooks

Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
This commit is contained in:
Maciej Pijanowski
2022-03-03 16:37:02 +01:00
parent f5e593e3c9
commit 3247cdf501
2 changed files with 31 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
---
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
+19
View File
@@ -33,3 +33,22 @@ mkdocs.yml)
- TBD or TODO is visible on website
There should be no TBD or TODO visible on website.
# pre-commit hooks
* [Install pre-commit](https://pre-commit.com/index.html#install)
* Install hooks into repo:
```
pre-commit install
```
* Enjoy automatic checks on each `git commit` action!
* (Optional) Run hooks on all files (for example, when adding new hooks or
configuring existing ones):
```bash
pre-commit run --all-files
```