-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
66 lines (66 loc) · 1.96 KB
/
.pre-commit-config.yaml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
---
default_install_hook_types:
- pre-commit
- pre-merge-commit
- commit-msg
default_stages:
- pre-commit
- pre-merge-commit
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# Reject commits that add large files (coverage.xml, for example)
# Consider adjusting kB limit
- id: check-added-large-files
args:
- --enforce-all
- --maxkb=5000
# Check for files that would conflict in case-insensitive filesystems
- id: check-case-conflict
# Check for files that contain merge conflict strings
- id: check-merge-conflict
# Check syntax of data files
- id: check-json
- id: check-toml
- id: check-yaml
# Files must end in a single newline
- id: end-of-file-fixer
exclude: ^(coverage|performance)/.+\.json$
# Remove whitespace at the end of lines
- id: trailing-whitespace
exclude: ^(coverage|performance)/.+\.json$
# Prevent commit to main/master
- id: no-commit-to-branch
# Sort spell check custom dictionary
- id: file-contents-sorter
files: ^.cspell/.+.txt$
args:
- --ignore-case
- --unique
- repo: local
hooks:
# Check files are valid UTF-8
- id: require-utf8
name: Check file encoding
description: Ensure file is valid UTF-8
entry: python pre_commit_hooks/require_utf8.py
language: python
# Keep requirements-docs.txt in sync with uv.lock
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
# No tabs, only spaces
- id: forbid-tabs
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.16.1
hooks:
# Run a spellcheck (words pulled from cspell.config.yaml)
- id: cspell
stages:
- pre-commit
- pre-merge-commit
- commit-msg
exclude_types:
- gitignore
exclude: .cspell/.*