-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
32 lines (29 loc) · 1.03 KB
/
.pre-commit-config.yaml
File metadata and controls
32 lines (29 loc) · 1.03 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-merge-conflict
- id: check-added-large-files
args: ['--maxkb=500']
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
args: ['--skip=LICENSE']
- repo: local
hooks:
- id: dco-check
name: DCO sign-off check
entry: sh -c 'git log -1 --format="%B" | grep -q "^Signed-off-by:"'
language: system
stages: [commit-msg]
- id: branch-name-check
name: Branch name convention
entry: sh -c 'branch=$(git rev-parse --abbrev-ref HEAD); case "$branch" in main|setup/*|feat/*|fix/*|docs/*|chore/*|refactor/*) exit 0;; *) echo "Branch name must match: setup/*, feat/*, fix/*, docs/*, chore/*, refactor/*"; exit 1;; esac'
language: system
always_run: true
pass_filenames: false
stages: [pre-push]