-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
89 lines (89 loc) · 2.4 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
89 lines (89 loc) · 2.4 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
# Run these hooks with prek: https://prek.j178.dev/
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3
default_install_hook_types:
- pre-commit
- commit-msg
repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.2.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: []
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: no-commit-to-branch
- id: check-executables-have-shebangs
- id: check-ast
- id: check-toml
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: pretty-format-json
args:
- --autofix
- repo: local
hooks:
- id: ruff-check
name: Ruff lint
entry: uv run --locked ruff check --fix
language: system
types_or: [python, pyi]
- id: ruff-format
name: Ruff format
entry: uv run --locked ruff format
language: system
types_or: [python, pyi]
- repo: local
hooks:
- id: pyrefly
name: Pyrefly type check
entry: uv run --locked pyrefly check
language: system
pass_filenames: false
files: \.(py|pyi|toml)$
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: forbid-crlf
- id: remove-crlf
- id: forbid-tabs
- id: remove-tabs
- repo: https://github.com/PyCQA/bandit
rev: 1.8.3
hooks:
- id: bandit
args: ["--skip=B101"]
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
rev: v1.0.1
hooks:
- id: rst-linter
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
entry: uv run --locked detect-secrets-hook
language: system
exclude: '^uv\.lock$'
# args: ['--baseline', '.secrets.baseline']
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
args: ["--external-sources"]
- repo: local
hooks:
- id: uv-lock
name: Check uv lockfile
entry: uv lock --check
language: system
files: ^(pyproject\.toml|uv\.lock)$
pass_filenames: false