-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy path.pre-commit-config.yaml
99 lines (90 loc) · 2.85 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_install_hook_types: [pre-commit, commit-msg]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
exclude: tests
- id: check-added-large-files
- id: fix-byte-order-marker
- id: check-case-conflict
- id: end-of-file-fixer
exclude: tests/fixtures
- id: trailing-whitespace
- id: mixed-line-ending
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.7.3
hooks:
# Run the linter.
- id: ruff
args: ['--fix', '--preview']
# Run the formatter.
- id: ruff-format
args: ['--preview']
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.0
hooks:
- id: mypy
additional_dependencies:
- annotated-types
- types-requests
- types-PyYAML
- pydantic
- repo: https://github.com/espressif/check-copyright/
rev: v1.0.3
hooks:
- id: check-copyright
args:
[
"--ignore",
"ci/check_copyright_ignore",
"--config",
"ci/check_copyright_config.yaml",
]
- repo: https://github.com/fpgmaas/deptry.git
rev: "0.21.0"
hooks:
- id: deptry
- repo: https://github.com/espressif/conventional-precommit-linter
rev: v1.10.0
hooks:
- id: conventional-precommit-linter
stages: [commit-msg]
args:
- --types=change,chore,ci,docs,feat,fix,refactor,remove,revert,test
- --allow-breaking
- repo: https://github.com/hfudev/rstfmt
rev: v0.1.4
hooks:
- id: rstfmt
args: ["-w", "-1"]
files: "docs\/.+rst$"
additional_dependencies: [
"sphinx_tabs",
"sphinx-click",
]
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.18
hooks:
- id: mdformat
args: [--number] # Keep numbering for ordered lists
additional_dependencies:
- mdformat-gfm # Support for GitHub Flavored Markdown (GFM), including tables, task lists, strikethroughs, and autolinks.
- mdformat-ruff # Formats Python code blocks in Markdown files according to the `ruff` linter's style.
- mdformat-simple-breaks # Ensures that single line breaks in Markdown are converted to `<br>`
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args:
- --base64-limit
- "5" # Level of entropy for base64 type strings
- --hex-limit
- "3" # Level of entropy for hex strings
- --exclude-lines
- "commit_sha:" # Exclude lines containing 'commit_sha:'
- --exclude-lines
- "\\s+string: !!binary |"