-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
48 lines (43 loc) · 1.39 KB
/
.pre-commit-config.yaml
File metadata and controls
48 lines (43 loc) · 1.39 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
# Install with: pnpm hooks:install
repos:
# Markdown linting
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.38.0
hooks:
- id: markdownlint
args: ['--config', '.markdownlint.json']
files: '^documents/.*\.md$'
exclude: '^documents/.*\bindex\.md$'
# Frontmatter validation (local hook)
- repo: local
hooks:
- id: validate-frontmatter
name: Validate article frontmatter
entry: scripts/validate_frontmatter.py
language: python
additional_dependencies: ['pyyaml']
files: '^documents/core-embedded-cpp/.*\.md$'
exclude: '(index\.md|tags\.md)$'
pass_filenames: false
- id: clang-format
name: clang-format C/C++ sources
entry: clang-format -i
language: system
files: '\.(c|cc|cpp|cxx|h|hh|hpp|hxx)$'
- id: update-translation-coverage
name: Update translation coverage
entry: python3 scripts/coverage.py --update
language: system
always_run: true
pass_filenames: false
# Check for added large files
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
args: ['--maxkb=1500']
- id: end-of-file-fixer
- id: trailing-whitespace
files: '^documents/.*\.md$'
- id: check-yaml
files: '^\.github/.*\.ya?ml$'