-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.pre-commit-config.yaml
34 lines (33 loc) · 1.27 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
# 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: v4.6.0
hooks:
- id: trailing-whitespace # trims trailing whitespace
- id: end-of-file-fixer # ensures that a file is either empty, or ends with one newline
- id: check-yaml
- id: check-toml
- id: check-added-large-files
- id: mixed-line-ending # replaces or checks mixed line ending
- id: check-symlinks # checks for symlinks which do not point to anything
- id: check-case-conflict # checks for files that would conflict in case-insensitive filesystems
# Git
- id: check-merge-conflict # checks for files that contain merge conflict strings
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
language: rust
entry: cargo fmt --all -- --check
files: \.rs$
- id: cargo-clippy
name: cargo clippy
language: rust
entry: cargo clippy --features=source --all-targets --workspace -- -Dwarnings
files: \.rs$
pass_filenames: false
# pre-commit.ci settings
# We don't need pre-commit.ci to fail for clippy, because we have GitHub actions for this
ci:
skip: [cargo-clippy]