This repository was archived by the owner on Apr 1, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
53 lines (48 loc) · 1.79 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
53 lines (48 loc) · 1.79 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
# Pre-commit hooks configuration for rust-docs-it
# See https://pre-commit.com for more information
repos:
# General file checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: check-yaml
exclude: ^mkdocs\.yml$ # MkDocs uses special YAML tags
- id: check-added-large-files
args: ["--maxkb=1000"]
- id: check-case-conflict
- id: check-merge-conflict
- id: mixed-line-ending
args: ["--fix=lf"]
# Markdown linting (optional - won't block commits)
# - repo: https://github.com/igorshubovych/markdownlint-cli
# rev: v0.39.0
# hooks:
# - id: markdownlint
# args: ["--fix", "--config", ".markdownlint.json"]
# exclude: ^docs/std/collections/index\.md$ # TODO: fix MD013 line-length issues
# Python code quality (for mkdocs and scripts)
- repo: https://github.com/psf/black
rev: 24.2.0
hooks:
- id: black
language_version: python3
files: \.py$
# YAML formatting
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
types_or: [yaml, json]
exclude: ^(docs/|mkdocs\.yml)
# Check for common typos
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
args:
- --ignore-words-list=crate,crates,ect,mut,nd,ser,te,ue,alle,tre,possibile,nome,rende,sequenze,strutture,accessibile,categorie,limite,serie,valide,stati,copie,implicite,normale,contro,succede,ignora,classe,momento,ore,allo,distribuite,vai,accelerare,compatibile,distintive
- --skip="*.pyc,*.svg,*.json,site/*"
exclude: ^(docs/GLOSSARY\.md|CHANGELOG\.md)$