-
Notifications
You must be signed in to change notification settings - Fork 201
/
.pre-commit-config.yaml
65 lines (64 loc) · 1.75 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
58
59
60
61
62
63
64
65
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-merge-conflict
- id: check-yaml
# excluding as inline json fails check-yaml
exclude: ^.github/workflows/polyglot_release.yml$
- id: check-toml
files: src/|test-resources/|demo/
- id: end-of-file-fixer
files: src/|test-resources/|demo/
- id: mixed-line-ending
files: src/|test-resources/|demo/
- repo: local
hooks:
- id: toml-fmt
name: toml-fmt
language: system
entry: taplo fmt
- id: cargo-fmt
name: cargo fmt
language: system
entry: bash -c 'cargo fmt'
types: [rust]
- id: cargo-clippy
name: cargo clippy
language: system
entry: bash -c 'cargo clippy --fix --allow-staged'
types: [rust]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.3.1
hooks:
- id: forbid-tabs
files: src/
- id: remove-tabs
files: src/
- id: insert-license
files: \.rs$
args:
- --license-filepath
- license_header.txt
- --comment-style
- /*| | */
- id: insert-license
files: '^piranha_playground/.*\.py$'
args:
- --license-filepath
- license_header.txt
- --comment-style
- "#"
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: "v2.0.2"
hooks:
- id: autopep8
files: demo/
exclude: only_lists.py
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.2"
hooks:
- id: prettier
files: ^experimental/piranha_playground/