-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
40 lines (40 loc) · 1.35 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
39
40
# 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.0.1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- repo: local
hooks:
- id: fmt
name: Format sources
entry: bash -c "cargo +nightly fmt -- || 1"
language: system
pass_filenames: false
- id: clippy
name: Lint sources
entry: bash -c "cargo +nightly clippy -- -D warnings"
language: system
pass_filenames: false
- id: test
name: Testing
entry: bash -c "cargo test"
language: system
pass_filenames: false
- id: udeps
name: Find unused dependencies
entry: bash -c "cargo +nightly udeps --all-targets"
language: system
pass_filenames: false
- id: generate-readme
name: Generate readme
entry: bash -c "markdown-pp main/README.tmpl.md -o main/README.md && git add -u main/README.md"
language: system
pass_filenames: false