-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.lefthook.yaml
More file actions
55 lines (55 loc) · 1.99 KB
/
.lefthook.yaml
File metadata and controls
55 lines (55 loc) · 1.99 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
# yaml-language-server: $schema=https://raw.githubusercontent.com/evilmartians/lefthook/refs/heads/master/schema.json
output: [summary]
templates:
run: run --as-is --quiet --no-progress
no_auto_install: true
pre-commit:
fail_on_changes: always
exclude:
- assets/**/*
jobs:
- name: pixi-install
run: pixi install
- group:
parallel: true
jobs:
- name: docformatter
glob: "*.py"
run: pixi {run} docformatter -i {staged_files}
- name: ruff-check
glob: "*.{py,pyi}"
run: pixi {run} ruff check --fix --exit-non-zero-on-fix --force-exclude
- name: ruff-format
glob: "*.{py,pyi}"
run: pixi {run} ruff format --force-exclude
- name: mypy
glob: "*.py"
run: pixi {run} mypy {staged_files}
- name: prettier
glob: "*.{md,yml,yaml}"
run: pixi {run} prettier --write --no-error-on-unmatched-pattern --list-different --ignore-unknown {staged_files}
- name: taplo
glob: "*.toml"
run: pixi {run} taplo format {staged_files}
- name: trailing-whitespace-fixer
glob: "*"
file_types: text
run: pixi {run} trailing-whitespace-fixer {staged_files}
- name: end-of-file-fixer
glob: "*"
file_types: text
run: pixi {run} end-of-file-fixer {staged_files}
- name: check-merge-conflict
glob: "*"
file_types: text
run: pixi {run} check-merge-conflict --assume-in-merge {staged_files}
- name: typos
glob: "*"
file_types: text
run: pixi {run} typos --force-exclude {staged_files}
- name: zizmor
glob: "*.{yml,yaml}"
run: pixi {run} zizmor --no-progress --min-severity high --fix --offline .
- name: conftest
glob: "Dockerfile*"
run: pixi {run} conftest-run {staged_files}