-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
38 lines (38 loc) · 1.18 KB
/
.pre-commit-config.yaml
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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
name: 🔳 Fix trailing whitespace
- id: end-of-file-fixer
name: ↩️ Fix end of file
- id: check-yaml
name: 🖖 Check YAML
- id: check-toml
name: 🫳 Check TOML
- id: check-added-large-files
name: 🍨 Check for large files
- repo: local
hooks:
- id: rustfmt
name: 🧹 Format Rust code
description: Check if all files follow the rustfmt style
entry: cargo fmt --all -- --color always
language: system
pass_filenames: false
- id: cargoclippy
name: 📎 Hi I'm Clippy
description: Run Clippy to give us some hints
entry: cargo clippy -- -D warnings
language: system
pass_filenames: false
files: \.rs$
- id: cargobuild
name: 🛠️ Build Rust code
description: Build the Rust code
entry: cargo build
language: system
pass_filenames: false
files: \.rs$