-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
71 lines (58 loc) · 1.7 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
71 lines (58 loc) · 1.7 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
# Pre-commit hooks configuration
# Install: pre-commit install
# Update: pre-commit autoupdate
# Run manually: pre-commit run --all-files
repos:
# General file checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
name: Trim trailing whitespace
exclude: '\.md$' # Preserve trailing spaces in Markdown
- id: end-of-file-fixer
name: Fix end of files
- id: check-yaml
name: Check YAML syntax
- id: check-added-large-files
name: Check for large files
args: ['--maxkb=1000']
- id: mixed-line-ending
name: Fix mixed line endings
args: ['--fix=lf']
- id: check-case-conflict
name: Check for case conflicts
- id: check-merge-conflict
name: Check for merge conflicts
- id: detect-private-key
name: Detect private keys
# Markdown linting
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.47.0
hooks:
- id: markdownlint
name: Lint Markdown files
args: ['--fix', '--config', '.markdownlint.yaml']
# Link checking (manual - can be slow/flaky depending on network)
- repo: https://github.com/lycheeverse/lychee
rev: nightly
hooks:
- id: lychee
name: Lychee (link checker)
stages: [manual]
files: '\.(md)$'
args:
- --no-progress
- --max-retries
- '2'
- --timeout
- '20'
# Optional: Configure which files to include/exclude
# files: ''
# exclude: ''
# Optional: Fail fast - stop on first error
fail_fast: false
# Optional: Default language version
default_language_version:
python: python3