-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
57 lines (55 loc) · 1.74 KB
/
.pre-commit-config.yaml
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
---
default_language_version:
python: python3.12
exclude: "^$"
fail_fast: true
repos:
# Simple hooks
# ------------
# pre-commit-hooks: some out-of-the-box hooks for pre-commit.
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
name: "[file - check] large file"
args: [--maxkb=5000]
- id: check-byte-order-marker
name: "[file - check] byte order marker"
- id: check-case-conflict
name: "[file - check] case conflict"
- id: check-json
name: "[json - check] validate json"
- id: check-merge-conflict
name: "[git - check] merge conflict"
- id: check-symlinks
name: "[link - check] broken symlinks"
- id: check-xml
name: "[xml - check] validate xml"
- id: check-yaml
name: "[yaml - check] validate yaml"
args: [--unsafe]
exclude: .gitlab-ci.yml
- id: mixed-line-ending
name: "[file - format] mixed line ending"
args: [--fix=auto]
- id: pretty-format-json
name: "[json - format] pretty json"
args: [--autofix, --indent=4, --no-sort-keys]
- id: trailing-whitespace
name: "[file - format] trim trailing whitespace"
args: [--markdown-linebreak-ext=md]
- repo: local
hooks:
- id: mojo-format
name: "[mojo - format] format mojo code"
entry: mojo format
args: [--line-length=119]
language: system
files: '\.(mojo|🔥)$'
stages: [commit]
- id: check-docstrings
name: "[mojo - check] check docstrings"
entry: python3 ./scripts/check-docstrings.py
language: system
pass_filenames: false
stages: [commit]