Skip to content

Commit da05a59

Browse files
committed
ci: add pre-commit config
1 parent 97a94f2 commit da05a59

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.pre-commit-config.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
ci:
2+
autoupdate_schedule: monthly
3+
4+
repos:
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v4.6.0
7+
hooks:
8+
- id: check-merge-conflict
9+
- id: check-added-large-files
10+
args: ['--maxkb=2000']
11+
12+
# Run ruff to lint and format
13+
- repo: https://github.com/astral-sh/ruff-pre-commit
14+
# Ruff version.
15+
rev: v0.6.1
16+
hooks:
17+
# Run the linter.
18+
- id: ruff
19+
args: [--fix]
20+
# Run the formatter.
21+
- id: ruff-format
22+
23+
# Do YAML formatting (before the linter checks it for misses)
24+
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
25+
rev: v2.14.0
26+
hooks:
27+
- id: pretty-format-yaml
28+
args: [--autofix, --indent, '2', --preserve-quotes]

0 commit comments

Comments
 (0)