add pre-commit
This commit is contained in:
parent
6daade9692
commit
20f4d0a6db
20
.pre-commit-config.yaml
Normal file
20
.pre-commit-config.yaml
Normal 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: ''
|
@ -6,6 +6,8 @@ vars:
|
|||||||
GREETING: Hello, World!
|
GREETING: Hello, World!
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
"precommit:init": pre-commit install -t pre-merge-commit -t pre-push
|
||||||
|
|
||||||
default:
|
default:
|
||||||
cmds:
|
cmds:
|
||||||
- echo "{{.GREETING}}"
|
- echo "{{.GREETING}}"
|
||||||
|
Loading…
Reference in New Issue
Block a user