add pre-commit

This commit is contained in:
Yanick Champoux 2022-12-01 12:50:41 -05:00
parent 6daade9692
commit 20f4d0a6db
2 changed files with 22 additions and 0 deletions

20
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,20 @@
default_stages:
- merge-commit
- push
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: end-of-file-fixer
stages: [merge-commit, push]
- id: trailing-whitespace
stages: [merge-commit, push]
- id: check-merge-conflict
- repo: local
hooks:
- id: lint
name: lint
entry: task lint:fix --
language: system
files: ''

View File

@ -6,6 +6,8 @@ vars:
GREETING: Hello, World!
tasks:
"precommit:init": pre-commit install -t pre-merge-commit -t pre-push
default:
cmds:
- echo "{{.GREETING}}"