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
# Pre-commit hooks configuration for rangebar
# Install: pip install pre-commit && pre-commit install
repos:
# Rust formatting and linting
- repo: local
hooks:
- id: cargo-fmt
name: cargo-fmt
description: Format Rust code with cargo fmt
entry: cargo fmt --all -- --check
language: system
files: \.rs$
pass_filenames: false
# Note: clippy disabled temporarily due to compilation errors
# - id: cargo-clippy
# name: cargo-clippy
# description: Lint Rust code with clippy
# entry: cargo clippy --all-targets --all-features
# language: system
# files: \.rs$
# pass_filenames: false
- id: cargo-test
name: cargo-nextest
description: Run tests with cargo nextest
entry: cargo nextest run
language: system
files: \.rs$
pass_filenames: false
# Note: cargo-deny disabled temporarily due to license config issues
# - id: cargo-deny
# name: cargo-deny
# description: Check dependencies with cargo deny
# entry: cargo deny check
# language: system
# files: Cargo\.(toml|lock)$
# pass_filenames: false
# Python formatting (for future Python integration)
- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
files: \.py$
args:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
hooks:
- id: ruff
args:
files: \.py$
# General file checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
exclude: \.md$
- id: end-of-file-fixer
exclude: \.md$
- id: check-toml
- id: check-yaml
- id: check-json
exclude: \.vscode/
- id: check-added-large-files
args:
- id: check-merge-conflict