-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
53 lines (48 loc) · 1.41 KB
/
.pre-commit-config.yaml
File metadata and controls
53 lines (48 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# The default stages for hooks that don't have stages configured.
default_stages:
- pre-commit
# This changes the behaviour when running "prek install".
# All hook types will be installed as configured here.
default_install_hook_types:
- pre-commit
- commit-msg
- post-commit
- pre-push
repos:
# All prek built-in hooks:
# https://prek.j178.dev/builtin/
- repo: builtin
hooks:
# Trims trailing whitespace.
- id: trailing-whitespace
# Checks for the existence of private keys.
- id: detect-private-key
# Prevent giant files from being committed.
- id: check-added-large-files
args: ["--maxkb=256"] # default --maxkb=500
# Replaces or checks mixed line endings.
- id: mixed-line-ending
args: ["--fix=lf"]
# Local hooks inside this repository.
- repo: local
hooks:
- id: typos
name: check misspelling by typos
language: system
entry: typos --hidden --exclude .git --format brief
pass_filenames: false
- id: commit-msg
name: check commit message
language: system
entry: sh ./scripts/commit-msg.sh
stages:
- commit-msg
- id: cocogitto
name: check conventional commits
language: system
entry: cog check origin/HEAD..HEAD
pass_filenames: false
always_run: true
stages:
- post-commit
- pre-push