-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
90 lines (80 loc) · 2.13 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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
repos:
# Rust-specific hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
stages: [pre-commit]
- id: end-of-file-fixer
stages: [pre-commit]
- id: check-yaml
stages: [pre-commit]
- id: check-added-large-files
stages: [pre-commit]
- id: check-merge-conflict
stages: [pre-commit]
# Markdown linting
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.43.0
hooks:
- id: markdownlint
name: Markdown Lint
entry: markdownlint
language: node
types: [markdown]
stages: [pre-commit]
args: ["--fix"]
# TOML formatting
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
hooks:
- id: pretty-format-toml
name: TOML Formatter
args: [--autofix]
stages: [pre-commit]
# Environment and secret scanning
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
name: Detect Secrets
entry: detect-secrets-hook
language: python
stages: [pre-push]
# Custom hooks
- repo: local
hooks:
- id: update-changelog
name: Update Changelog
entry: ./scripts/update_changelog.sh
language: script
pass_filenames: false
always_run: true
stages: [pre-push]
- id: cargo-audit
name: Cargo Audit
entry: cargo audit
language: system
types: [rust]
pass_filenames: false
- id: rust-fmt
name: Rust Format
entry: cargo fmt --all --check
language: system
types: [rust]
pass_filenames: false
stages: [pre-commit]
- id: rust-clippy
name: Rust Clippy
entry: cargo clippy
language: system
types: [rust]
pass_filenames: false
always_run: true
stages: [pre-commit]
# Global configuration
default_language_version:
python: python3.9
default_stages: [pre-commit, pre-push]
fail_fast: true
minimum_pre_commit_version: "2.20.0"