-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
78 lines (70 loc) · 2.01 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
78 lines (70 loc) · 2.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
default_install_hook_types: [pre-commit, pre-push]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-merge-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-toml
- id: check-yaml
- id: check-json
- id: check-ast
- id: debug-statements
- id: check-case-conflict
- id: check-symlinks
- id: destroyed-symlinks
- id: detect-private-key
- id: mixed-line-ending
args: [--fix=lf]
- id: forbid-submodules
- repo: local
hooks:
- id: ruff-format
name: Ruff (format)
entry: uv run ruff format .
language: system
pass_filenames: false
stages: [pre-commit]
- id: ruff-check
name: Ruff (lint)
entry: uv run ruff check .
language: system
pass_filenames: false
stages: [pre-commit]
- id: mypy
name: Mypy
entry: uv run mypy
language: system
pass_filenames: false
always_run: true
stages: [pre-commit]
- id: codeclone
name: CodeClone
entry: uv run codeclone
language: system
pass_filenames: false
args: [".", "--ci"]
always_run: true
stages: [pre-commit]
- id: pytest
name: Pytest
entry: uv run pytest -q --cov=codeclone --cov-report=term-missing --cov-fail-under=99
language: system
pass_filenames: false
always_run: true
stages: [pre-push]
- id: lint-admonitions
name: Lint admonitions
entry: uv run scripts/lint_admonitions.py docs/ --fix
language: system
pass_filenames: false
files: ^docs/.*\.md$
stages: [ pre-commit ]
- id: ty-prod-scope
name: Ty check production scope
entry: bash -c 'uv run ty check codeclone .github/actions benchmarks'
language: system
pass_filenames: false
always_run: true
stages: [ pre-commit ]