-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
66 lines (58 loc) · 1.66 KB
/
.pre-commit-config.yaml
File metadata and controls
66 lines (58 loc) · 1.66 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
56
57
58
59
60
61
62
63
64
65
66
# Pre-commit hooks for OMG
# Install: pre-commit install
# Run all: pre-commit run --all-files
# Update: pre-commit autoupdate
default_language_version:
python: python3
repos:
# General hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-added-large-files
args: ['--maxkb=1000']
- id: check-merge-conflict
- id: detect-private-key
- id: mixed-line-ending
args: ['--fix=lf']
# Rust formatting (uses rustfmt)
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt --all --
language: system
types: [rust]
pass_filenames: false
- id: cargo-check
name: cargo check
entry: cargo check --all-targets --no-default-features --features pgp,license
language: system
types: [rust]
pass_filenames: false
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy --all-targets --no-default-features --features pgp,license -- -D warnings
language: system
types: [rust]
pass_filenames: false
# Commit message validation (conventional commits)
- repo: https://github.com/commitizen-tools/commitizen
rev: v4.0.0
hooks:
- id: commitizen
stages: [commit-msg]
# Secret scanning
- repo: https://github.com/gitleaks/gitleaks
rev: v8.21.2
hooks:
- id: gitleaks
# YAML/JSON validation
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.31.0
hooks:
- id: check-github-workflows