-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
55 lines (49 loc) · 1.51 KB
/
.pre-commit-config.yaml
File metadata and controls
55 lines (49 loc) · 1.51 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
49
50
51
52
53
54
55
# Pre-commit hooks for roboflow
# Install: pip install pre-commit && pre-commit install
# Run manually: pre-commit run --all-files
repos:
# Rust formatting
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt -- --
language: system
types: [rust]
pass_filenames: false
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy --all-targets --all-features -- -D warnings
language: system
types: [rust]
pass_filenames: false
- id: cargo-test
name: cargo test
entry: cargo test --workspace --quiet
language: system
types: [rust]
pass_filenames: false
stages: [pre-push]
- id: check-license-headers
name: Check license headers
entry: bash -c 'grep -L "SPDX-FileCopyrightText" "$@" && echo "Missing license headers" && exit 1 || true'
language: system
types: [rust]
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--unsafe]
- id: check-toml
- id: check-merge-conflict
- id: debug-statements
# Commit message format (Conventional Commits)
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.2.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: [feat, fix, docs, style, refactor, test, chore, perf]