-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
104 lines (84 loc) · 2.79 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# Git style.
- id: check-added-large-files # Tags: lint.
name: Check large files
- id: check-merge-conflict # Tags: lint.
name: Check merge conflicts
- id: check-vcs-permalinks # Tags: lint.
name: Check VCS permalinks
- id: forbid-new-submodules # Tags: lint.
name: Check new submodules
# Common errors.
- id: destroyed-symlinks # Tags: lint.
name: Check destroyed symlinks
- id: check-executables-have-shebangs # Tags: lint.
name: Check executables have shebangs
- id: check-shebang-scripts-are-executable # Tags: lint.
name: Check shebang scripts are executable
- id: check-yaml # Tags: lint.
name: Check YAML files
args: [--unsafe]
- id: end-of-file-fixer # Tags: format.
name: Fix end of files
- id: fix-byte-order-marker # Tags: format.
name: Fix byte order markers
- id: trailing-whitespace # Tags: format.
name: Fix trailing whitespace
args: [--markdown-linebreak-ext=md]
# Cross platform.
- id: check-case-conflict # Tags: lint.
name: Check case conflicts
- id: mixed-line-ending # Tags: format.
name: Fix mixed line endings
args: [--fix=lf]
# Security.
- id: detect-aws-credentials # Tags: lint.
name: Detect AWS credentials
args: [--allow-missing-credentials]
- id: detect-private-key # Tags: lint.
name: Detect private keys
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.4.2
hooks:
- id: prettier # Tags: format.
name: Format Markdown files with Prettier
args: [--prose-wrap=always]
types: [markdown]
- repo: https://github.com/google/yamlfmt
rev: v0.14.0
hooks:
- id: yamlfmt # Tags: format.
name: Format YAML files with yamlfmt
- repo: local
hooks:
- id: ruff-format
name: Run Ruff formatter
pass_filenames: false
require_serial: true
language: system
entry: uv run ruff format
types: [python]
- id: ruff-fix
name: Run Ruff checker (fix)
pass_filenames: false
require_serial: true
language: system
entry: uv run ruff check --fix --fix-only --unsafe-fixes
types: [python]
- id: ruff-lint
name: Run Ruff checker (nofix)
pass_filenames: false
require_serial: true
language: system
entry: uv run ruff check --no-fix
types: [python]
- id: mypy
name: mypy
language: system
entry: uv run dmypy run --timeout 3600 src
pass_filenames: false
require_serial: true
types: [python]