forked from Eventual-Inc/Daft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
111 lines (101 loc) · 2.56 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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
hooks:
- id: mypy
additional_dependencies: [types-requests, types-PyYAML, types-tabulate]
files: daft
exclude: daft/pickle/.*\.py
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: detect-private-key
- id: trailing-whitespace
exclude: docs/source/api_docs/
- id: end-of-file-fixer
exclude: docs/source/api_docs/
- id: check-yaml
exclude: kubernetes-ops
- id: pretty-format-json
exclude: |
(?x)^(
tutorials/.*\.ipynb|
docs/.*\.ipynb
)$
args:
- --autofix
- --no-sort-keys
- '--indent= '
- id: check-added-large-files
- id: check-merge-conflict
- id: check-docstring-first
- id: check-toml
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.6.0
hooks:
- id: pretty-format-toml
args: [--autofix]
exclude: Cargo.lock
- id: pretty-format-yaml
args: [--autofix]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.7
hooks:
# Run the linter.
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
# Run the formatter.
- id: ruff-format
- repo: local
hooks:
- id: fmt
name: fmt
description: Format files with cargo fmt.
entry: cargo fmt
language: system
types: [rust]
args: [--]
- id: cargo-check
name: cargo check
description: Check the package for errors.
entry: cargo check
language: system
types: [rust]
pass_filenames: false
args: [--workspace]
- id: cargo-check-no-default
name: cargo check
description: Check the package for errors without default features.
entry: cargo check
language: system
types: [rust]
pass_filenames: false
args: [--workspace, --no-default-features]
- id: clippy
name: clippy
description: Lint rust sources
entry: cargo clippy
language: system
args: [--workspace, --, -D, warnings]
types: [rust]
pass_filenames: false
- id: check-for-rustls
name: check-for-rustls
description: Lint rust sources
entry: ./tools/check_for_rustls.sh
language: system
types: [rust]
pass_filenames: false
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.10.1
hooks:
- id: validate-pyproject