[[repos]]
repo = "https://github.com/pre-commit/pre-commit-hooks"
rev = "v6.0.0"
hooks = [
{ id = "check-toml", priority = 10 },
{ id = "check-json", priority = 10 },
{ id = "check-yaml", args = ["--unsafe"], priority = 10 },
{ id = "end-of-file-fixer", priority = 10 },
{ id = "trailing-whitespace", priority = 10 },
{ id = "mixed-line-ending", args = ["--fix=lf"], priority = 10 },
{ id = "check-merge-conflict", priority = 10 },
{ id = "check-added-large-files", args = ["--maxkb=512"], priority = 0, fail_fast = true },
{ id = "detect-private-key", priority = 0, fail_fast = true },
]
[[repos]]
repo = "https://github.com/gitleaks/gitleaks"
rev = "v8.30.1"
hooks = [
{ id = "gitleaks", priority = 0, fail_fast = true },
]
[[repos]]
repo = "https://github.com/google/yamlfmt"
rev = "v0.21.0"
hooks = [
{ id = "yamlfmt", priority = 10 },
]
[[repos]]
repo = "local"
hooks = [
{
id = "cargo-fmt",
name = "cargo fmt",
entry = "cargo fmt --all --",
language = "system",
types = ["rust"],
pass_filenames = false,
priority = 20,
},
{
id = "cargo-clippy",
name = "cargo clippy (warnings are errors)",
entry = "cargo clippy --all-targets --all-features -- -D warnings",
language = "system",
types = ["rust"],
pass_filenames = false,
priority = 30,
fail_fast = true,
},
{
id = "cargo-lock",
name = "Cargo.lock matches Cargo.toml",
entry = "cargo metadata --locked --format-version 1 --quiet",
language = "system",
files = '^(Cargo\.toml|Cargo\.lock)$',
pass_filenames = false,
priority = 5,
},
{
id = "no-secret-literals",
name = "no hardcoded secrets in source",
entry = "scripts/check_no_secret_literals.sh",
language = "system",
types = ["rust"],
exclude = '^tests/',
priority = 0,
fail_fast = true,
},
{
id = "pending-snapshots",
name = "no unreviewed insta snapshots",
entry = "scripts/check_no_pending_snapshots.sh",
language = "system",
pass_filenames = false,
priority = 5,
},
]