-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
110 lines (100 loc) · 3.25 KB
/
.pre-commit-config.yaml
File metadata and controls
110 lines (100 loc) · 3.25 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
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
105
106
107
108
109
110
---
default_stages: [pre-commit, pre-push]
default_language_version:
python: python3
node: 24.15.0
repos:
- repo: meta
hooks:
- id: check-hooks-apply
name: check that hooks apply
description: check that all the hooks apply to the repository
- repo: local
hooks:
- id: prettier
name: run prettier
description: format files with prettier
entry: prettier --write '**/*.yaml' '**/*.yml'
files: \.ya?ml$
language: node
additional_dependencies: ['prettier@3.8.3']
- repo: https://github.com/pycqa/isort
rev: 8.0.1
hooks:
- id: isort
name: isort (python imports)
language: python
types: [python]
files: \.py$
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 26.3.1
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.11
hooks:
# Run the linter.
- id: ruff-check
args: [--fix]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/pypa/pip-audit
rev: v2.10.0
hooks:
- id: pip-audit
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-illegal-windows-names
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
- id: debug-statements
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- id: detect-private-key
- id: fix-byte-order-marker
- id: forbid-submodules
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-mock-methods
name: run check for not-real mock methods
description: Prevent common mistakes of assert mck.not_called(), assert mck.called_once_with(...) and mck.assert_called
- id: python-no-eval
name: run check for eval()
description: A quick check for the eval() built-in function
- id: python-no-log-warn
name: run check for use logger.warning(
description: A quick check for the deprecated .warn() method of python loggers
- id: python-use-type-annotations
name: run check for type annotations not comments
description: Enforce that python3.6+ type annotations are used instead of type comments
- id: text-unicode-replacement-char
name: run check for no unicode replacement char
description: Forbid files which have a UTF-8 Unicode replacement character
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.48.0
hooks:
- id: markdownlint
name: run markdownlint
description: check Markdown files with markdownlint
args: [--config=.github/linters/.markdown-lint.yml]
types: [markdown]
files: \.md$
- repo: https://github.com/adrienverge/yamllint
rev: v1.38.0
hooks:
- id: yamllint
name: run yamllint
description: check YAML files with yamllint
args: [--strict, -c=.github/linters/.yaml-lint.yml]
types: [yaml]
files: \.ya?ml$