forked from ferrumfix/ferrumfix
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
30 lines (27 loc) · 1.04 KB
/
.pre-commit-config.yaml
File metadata and controls
30 lines (27 loc) · 1.04 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0 # Or the latest stable version
hooks:
- id: check-yaml # Verify YAML syntax
- id: check-toml # Verify TOML syntax (in case your Cargo.toml is in the repo)
- id: check-added-large-files # Prevent committing large files
- repo: local # Run cargo check locally
hooks:
- id: cargo-check
name: Cargo Check
language: system
entry: cargo check --all-targets --all-features --workspace
files: \.rs$
pass_filenames: false # Always run, regardless of changed files
- id: cargo-clippy
name: Cargo Clippy
language: system
entry: cargo clippy --all-targets --all-features --workspace --fix --allow-dirty --
files: \.rs$
pass_filenames: false # Always run, regardless of changed files
- id: cargo-fmt
name: Cargo Fmt
language: system
entry: cargo fmt --all
files: \.rs$
pass_filenames: false # Always run, regardless of changed files