-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
48 lines (48 loc) · 1.38 KB
/
.pre-commit-config.yaml
File metadata and controls
48 lines (48 loc) · 1.38 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
# 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
# `.rs` files are taken care of by `cargo fmt`
exclude: ^.*\.rs$
- id: end-of-file-fixer
- id: check-merge-conflict
- repo: https://github.com/astral-sh/ruff-pre-commit
# A fast Python linter and code formatter. See
# https://docs.astral.sh/ruff/ for more details.
rev: v0.6.5
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
args: []
- repo: local
hooks:
- id: fmt
name: cargo fmt
description: Format Rust files with cargo fmt.
entry: cargo fmt --
language: system
files: ^neopdf\S*\/.*\.rs$
args: []
- id: check
name: cargo check
description: Run cargo check.
entry: bash -c 'cargo check'
language: system
require_serial: true
types: [rust]
- id: clippy
name: cargo clippy
description: Check Rust files with cargo clippy.
# Show only errors and ignore warnings
entry: cargo clippy --all-targets -- -Awarnings
pass_filenames: false
types: [file, rust]
language: system
- repo: https://github.com/pre-commit/pre-commit
rev: v3.8.0
hooks:
- id: validate_manifest