-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
35 lines (32 loc) · 1.04 KB
/
.pre-commit-config.yaml
File metadata and controls
35 lines (32 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
31
32
33
34
35
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- repo: local
hooks:
- id: find-fixme-phrase
name: Find FIXME phrase
entry: bash -c 'git diff --cached --name-only --diff-filter=ACM | grep -E "\.(txt|js|ts|py|rs|go|java|c|cpp|sh|ab)$" | xargs -r grep -l "FIXME" | grep -E ".+" && exit 1 || exit 0'
language: system
files: '\.(txt|js|ts|py|rs|go|java|c|cpp|sh|ab)$'
description: Checks for the "FIXME" phrase in staged text files.
- repo: local
hooks:
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy --all-targets --all-features -- -D warnings
language: system
types: [rust]
pass_filenames: false
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt --check
entry: cargo +nightly fmt --check
language: system
types: [rust]
pass_filenames: false