-
Notifications
You must be signed in to change notification settings - Fork 363
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
95 lines (89 loc) · 3.2 KB
/
.pre-commit-config.yaml
File metadata and controls
95 lines (89 loc) · 3.2 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
90
91
92
93
94
95
ci:
skip: [jac-format]
exclude: |
(?x)(
^jac/jaclang/vendor/|
^$
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
args: [--allow-multiple-documents, --unsafe]
- id: check-json
- id: trailing-whitespace
- id: mixed-line-ending
args: [--fix=lf]
- id: end-of-file-fixer
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.22.0
hooks:
- id: markdownlint-cli2
args: [--fix]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.8
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.1
hooks:
- id: mypy
args:
- --ignore-missing-imports
- --config-file=mypy.ini
- --explicit-package-bases
additional_dependencies: [types-PyYAML, types-requests]
exclude: (/fixtures/|/vendor/|/scripts/|jac/examples/reference)
- repo: local
hooks:
- id: check-no-binary-files
name: Check for binary files
entry: Binary files are not allowed
language: fail
types: [binary]
exclude: |
(?x)(
^jac-client/jac_client/examples/all-in-one/assets/burger.png$|
^docs/docs/assets/logo\.png$|
^docs/docs/assets/org1_logo\.png$|
^docs/docs/assets/org2_logo\.png$|
^docs/docs/assets/org3_logo\.png$|
^jac-byllm/examples/vision/math_question\.jpg$|
^jac-byllm/examples/vision/mugen\.mp4$|
^jac-byllm/examples/vision/person\.png$|
^jac-byllm/examples/vision/receipt\.jpg$|
^jac-byllm/tests/fixtures/SampleVideo_1280x720_2mb\.mp4$|
^jac-byllm/tests/fixtures/alan-m-turing\.jpg$|
^jac-byllm/tests/fixtures/image\.jpg$|
^jac-byllm/tests/fixtures/math_question\.jpg$|
^jac-byllm/tests/fixtures/webp_image_of_person\.webp$|
^jac-client/jac_client/examples/asset-serving/css-with-image/assets/burger\.png$|
^jac-client/jac_client/examples/asset-serving/image-asset/assets/burger\.png$|
^jac-client/jac_client/examples/asset-serving/import-alias/assets/burger\.png$|
^jac/examples/rpg_game/jac_impl/fonts/8bitoperator_jve\.ttf$|
^jac/examples/rpg_game/lib_mode/8bitoperator_jve\.ttf$
)
- id: ban-em-dashes
name: Ban em-dashes (—)
language: pygrep
entry: '—'
types: [markdown]
- id: no-ai-coauthor
name: Block AI co-author attribution
language: pygrep
entry: '(?i)co-authored-by:.*\b(claude|anthropic|openai|copilot|gpt|gemini|ai|bot)\b'
stages: [commit-msg]
- id: jac-format
name: jac-format
description: Format and lint-fix Jac files
entry: env PYTHONPATH=jac python3 -m jaclang format
language: python
types: [file]
args: [--lintfix]
files: \.jac$
require_serial: true
exclude: (/fixtures/|_err\.jac$|_syntax_err\.jac$|^scripts/)
additional_dependencies: [llvmlite>=0.43.0]