-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathprek.toml
More file actions
43 lines (40 loc) · 2.62 KB
/
prek.toml
File metadata and controls
43 lines (40 loc) · 2.62 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
minimum_prek_version = "0.3.10"
default_install_hook_types = ["pre-commit", "commit-msg", "pre-push"]
fail_fast = true
exclude = { glob = [
"target/**",
"examples/tauri-sqlx-vanilla/node_modules/**",
"examples/tauri-sqlx-vanilla/dist/**",
"examples/tauri-sqlx-vanilla/src-tauri/target/**",
] }
[[repos]]
repo = "builtin"
hooks = [
{ id = "trailing-whitespace", args = ["--markdown-linebreak-ext=md"], stages = ["pre-commit"], types = ["text"] },
{ id = "end-of-file-fixer", stages = ["pre-commit"], types = ["text"] },
{ id = "check-toml", stages = ["pre-commit"] },
{ id = "check-yaml", stages = ["pre-commit"] },
{ id = "check-json", stages = ["pre-commit"], exclude = "(^|/)tsconfig\\.json$" },
{ id = "check-merge-conflict", stages = ["pre-commit"] },
{ id = "check-case-conflict", stages = ["pre-commit"] },
{ id = "check-illegal-windows-names", stages = ["pre-commit"] },
{ id = "detect-private-key", stages = ["pre-commit"], types = ["text"] },
{ id = "check-added-large-files", args = ["--maxkb=15000"], stages = ["pre-commit"] },
]
[[repos]]
repo = "https://github.com/crate-ci/committed"
rev = "v1.1.11"
hooks = [
{ id = "committed", args = ["--fixup", "--commit-file"], stages = ["commit-msg"] },
]
[[repos]]
repo = "local"
hooks = [
{ id = "cargo-fmt", name = "cargo fmt", language = "system", entry = "cargo fmt --check", pass_filenames = false, files = "\\.(rs|toml)$", stages = ["pre-commit"] },
{ id = "tauri-cargo-fmt", name = "Tauri cargo fmt", language = "system", entry = "cargo fmt --manifest-path examples/tauri-sqlx-vanilla/src-tauri/Cargo.toml --check", pass_filenames = false, files = "^examples/tauri-sqlx-vanilla/src-tauri/.*\\.(rs|toml)$", stages = ["pre-commit"] },
{ id = "git-diff-check", name = "git diff --check", language = "system", entry = "git diff --check", pass_filenames = false, always_run = true, stages = ["pre-push"] },
{ id = "pre-push-fmt", name = "pre-push cargo fmt", language = "system", entry = "cargo fmt --all --check", pass_filenames = false, always_run = true, stages = ["pre-push"] },
{ id = "asset-input-fingerprint", name = "asset input fingerprint", language = "system", entry = "scripts/check-asset-input-fingerprint.sh", pass_filenames = false, always_run = true, stages = ["pre-push"] },
{ id = "example-lockfiles", name = "example lockfiles", language = "system", entry = "scripts/check-example-lockfiles.sh", pass_filenames = false, always_run = true, stages = ["pre-push"] },
{ id = "pre-push-check", name = "pre-push cargo check", language = "system", entry = "cargo check --workspace --locked", pass_filenames = false, always_run = true, stages = ["pre-push"] },
]