-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
54 lines (48 loc) · 1.28 KB
/
.pre-commit-config.yaml
File metadata and controls
54 lines (48 loc) · 1.28 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
# General file checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-added-large-files
- id: check-merge-conflict
- id: check-case-conflict
# Rust-specific hooks
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
# Format code
- id: fmt
args: ["--verbose", "--"]
# Lint with clippy
- id: clippy
args:
[
"--workspace",
"--all-targets",
"--all-features",
"--",
"-D",
"warnings",
]
# Check that code compiles
- id: cargo-check
args: ["--workspace", "--all-targets", "--all-features"]
# Markdown-specific hooks
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.18.1
hooks:
- id: markdownlint-cli2
# TOML-specific hooks
- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format
# Configuration for specific hooks
default_stages: [pre-commit]
fail_fast: false