-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
69 lines (61 loc) · 2.23 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
69 lines (61 loc) · 2.23 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
# Lint/type/fmt gate — CI lint job on ubuntu-latest (see .github/workflows/ci.yml).
# That job runs clippy (via pre-commit cargo-clippy) on `shared-key: test`, then
# restores `shared-key: coverage` before incremental llvm-cov when diff coverage is in scope.
# Cross-platform plain nextest uses `shared-key: test` on arm/macos.
# Full operator safety net before push:
# cargo test --manifest-path greenfloor-engine/Cargo.toml --features test-support
#
# Speed tips:
# export PRE_COMMIT_HOME="$(pwd)/.cache/pre-commit" # reuse hook envs (CI caches this path)
# pre-commit run --all-files # ~5–10s warm; first run installs prettier/yamllint
repos:
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt (greenfloor-engine)
entry: cargo fmt --manifest-path greenfloor-engine/Cargo.toml --check
language: system
pass_filenames: false
files: ^greenfloor-engine/
- id: cargo-clippy
# --tests: integration tests + lib `#[cfg(test)]` modules; skips bin-only recompile from --all-targets.
name: cargo clippy (greenfloor-engine, clippy::all + pedantic)
entry: >-
cargo clippy --manifest-path greenfloor-engine/Cargo.toml
--lib --bins --tests --no-deps --features test-support
language: system
pass_filenames: false
files: ^greenfloor-engine/
- id: ruff
name: ruff
entry: ruff check --fix
language: system
types: [python]
- id: audit-event-direct-calls
name: audit event direct calls
entry: scripts/check_audit_event_direct_calls.sh
language: system
pass_filenames: false
files: ^greenfloor-engine/
- id: ruff-format
name: ruff format
entry: ruff format
language: system
types: [python]
- id: pyright
name: pyright
entry: pyright
language: system
types: [python]
pass_filenames: false
- id: yamllint
name: yamllint
entry: yamllint
language: system
files: "\\.(ya?ml)$"
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
files: "\\.(ya?ml|json|md)$"