-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
55 lines (50 loc) · 1.46 KB
/
.pre-commit-config.yaml
File metadata and controls
55 lines (50 loc) · 1.46 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
# Pre-commit hooks for Oxyde ORM
# Install: pre-commit install
# Run manually: pre-commit run --all-files
repos:
# Ruff - fast Python linter and formatter (replaces black, isort, flake8)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.7
hooks:
- id: ruff
args: ["--fix", "--config", "python/pyproject.toml"]
files: ^python/oxyde/
exclude: ^python/oxyde/tests/
- id: ruff-format
args: ["--config", "python/pyproject.toml"]
files: ^python/oxyde/
exclude: ^python/oxyde/tests/
# Rust formatting
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt --all --
language: system
types: [rust]
pass_filenames: false
- id: cargo-check
name: cargo check
entry: cargo check --workspace
language: system
types: [rust]
pass_filenames: false
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy --workspace -- -D warnings
language: system
types: [rust]
pass_filenames: false
# General file checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: mkdocs\.yml$
- id: check-toml
- id: check-added-large-files
args: ["--maxkb=500"]
- id: check-merge-conflict
- id: detect-private-key