-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
139 lines (123 loc) · 4.01 KB
/
.pre-commit-config.yaml
File metadata and controls
139 lines (123 loc) · 4.01 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# Enable the hooks for this repo
# > pip install --user --upgrade uv
# > uv tool install pre-commit
# > pre-commit install
# yamllint disable rule:line-length
# Completely exclude certain files from checks
# exclude: |
# (?x)^(
# vendor/.**|
# dir2/.*
# )$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files # Prevents giant files from being committed
- id: check-docstring-first # Prevent code before docstring
- id: check-json # Check that JSON files are valid
exclude: |
(?x)^(
.devcontainer/devcontainer.json
)$
- id: check-merge-conflict # Check merge conflict strings
- id: check-symlinks # Ensure symlinks have a valid target
- id: check-toml # Ensure toml files are valid
- id: check-xml # Check that XML files are valid
- id: debug-statements # debugger imports and breakpoint() calls
- id: end-of-file-fixer # File is empty or ends with one newline
- id: fix-byte-order-marker # Forbid utf-8 byte order marker
- id: trailing-whitespace # Trims trailing whitespace
args: [--markdown-linebreak-ext=md]
# exclude: |
# (?x)^(
# test\.py|
# testdata/.*
# )$
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
# Lint restructuredText files
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
# Forbid UTF-8 replacement character
- id: text-unicode-replacement-char
- repo: https://github.com/adrienverge/yamllint
rev: "v1.38.0"
hooks:
# Lint yaml files
- id: yamllint
args: ["--strict", "-c", ".github/yamllint-config.yaml"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.15.11"
hooks:
# Note: lint/fix before format
- id: ruff-check
# args: [ --fix ]
- id: ruff-format
- repo: https://github.com/astral-sh/uv-pre-commit
rev: "0.11.7"
hooks:
- id: uv-lock
- repo: https://github.com/hadolint/hadolint
rev: v2.14.0
hooks:
# Lint Dockerfiles
- id: hadolint
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: "v0.48.0"
hooks:
# Lint markdown files
- id: markdownlint
args: ["--config", ".github/markdownlint-config.yaml"]
exclude: |
(?x)^(
.github/pull_request_template.md |
.github/skills/.*/SKILL.md |
.gemini/skills/playwright-cli/.* |
CLAUDE.md
)$
- repo: https://github.com/Mergifyio/mergify-pre-commit
rev: "1.1.0"
hooks:
- id: validate-mergify-config-location
- id: validate-mergify-config
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: "43.111.1"
hooks:
# Validate Renovate's configuration file
- id: renovate-config-validator
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.6
hooks:
- id: shellcheck
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
# Prevent secrets from being committed
- id: detect-secrets
# args: ['--baseline', '.secrets.baseline']
# exclude: package.lock.json
- repo: https://gitlab.com/bmares/check-json5
rev: "v1.0.1"
hooks:
# Check that JSON files are valid JSON5
- id: check-json5
# Local hooks for Python type checking and testing
# - repo: local
# hooks:
# - id: pyright
# name: Type check Python code with Pyright
# entry: uv run pyright
# language: system
# types: [python]
# - id: pytest
# name: Run Python unit tests with pytest
# entry: uv run pytest
# language: system
# pass_filenames: false
# types: [python]