-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
74 lines (68 loc) · 1.67 KB
/
.pre-commit-config.yaml
File metadata and controls
74 lines (68 loc) · 1.67 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
72
73
74
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
args: [--maxkb=500]
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--allow-multiple-documents]
- id: check-json
- id: check-merge-conflict
- id: check-case-conflict
- id: mixed-line-ending
args: [--fix=lf]
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: debug-statements
- id: name-tests-test
args: [--pytest-test-first]
# Shell script linting
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
- id: shellcheck
args: [--severity=warning]
# Markdown formatting
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.22
hooks:
- id: mdformat
additional_dependencies:
- mdformat-gfm
- mdformat-tables
# YAML formatting
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.16.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, '2']
# Check for common spelling mistakes
- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
hooks:
- id: codespell
args: ['--ignore-words-list=crate,nd,ser,te', '--skip=*.json,*.lock']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.6
hooks:
- id: ruff
args:
- --fix
- id: ruff-format
files: ^((project_name|tests|examples)/.+)?[^/]+\.(py|pyi)$
# Global file exclusions
exclude: |
(?x)^(
\.git/.*|
.devcontainer/.*|
.mypy_cache/.*|
.pytest_cache/.*|
.ruff_cache/.*|
.tox/.*|
.venv/.*|
__pycache__/.*|
.coverage/.*|
)$