-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
43 lines (40 loc) · 1.25 KB
/
.pre-commit-config.yaml
File metadata and controls
43 lines (40 loc) · 1.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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v6.0.0"
hooks:
- id: check-case-conflict
- id: check-merge-conflict
- id: check-json
exclude: ^.devcontainer/.*devcontainer.json
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
args: [ --fix=lf ]
- id: pretty-format-json
exclude: ^.devcontainer/.*devcontainer.json
args: [--autofix, --no-sort-keys]
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.12.7"
hooks:
- id: ruff-check
args: [ --fix, --exit-non-zero-on-fix ]
- id: ruff-format
- repo: local
hooks:
- id: canonicalize-gitignore
name: Sort unique .gitignore
entry: sh -c 'LC_ALL=C sort -u -o .gitignore .gitignore'
language: system
files: ^\.gitignore$
- repo: local
hooks:
- id: canonicalize-pyproject
name: Ensure pyproject.toml in canonical order and format
entry: uvx toml-sort --in-place --all pyproject.toml
language: system
files: ^pyproject.toml$