fail_fast = true

[[repos]]
repo = "builtin"

[[repos.hooks]]
id = "trailing-whitespace"

[[repos.hooks]]
id = "check-yaml"

[[repos]]
repo = "local"

[[repos.hooks]]
id = "tombi-check"
name = "check toml"
entry = "tombi check"
language = "system"
pass_filenames = false
types = ["toml"]

[[repos.hooks]]
id = "tombi-fmt"
name = "format toml"
entry = "tombi format"
language = "system"
pass_filenames = false
types = ["toml"]

[[repos.hooks]]
id = "clippy"
name = "clippy"
entry = "cargo clippy --fix --allow-dirty --all-targets --all-features -- -D warnings"
language = "system"
pass_filenames = false
types = ["rust"]
priority = 3

[[repos.hooks]]
id = "rustfmt"
name = "format rust"
entry = "cargo fmt -- --files-with-diff"
language = "system"
pass_filenames = false
types = ["rust"]

[[repos.hooks]]
id = "test"
name = "test rust"
entry = "cargo test"
language = "system"
pass_filenames = false
types = ["rust"]

[[repos.hooks]]
id = "mdlint"
name = "check markdown (dogfood)"
entry = "cargo run -- check --exclude FORMAT_SPEC.md --exclude tests/fixtures"
language = "system"
pass_filenames = false
types = ["rust"]

[[repos.hooks]]
id = "hadolint"
name = "check dockerfile"
entry = "hadolint"
language = "system"
files = "^Dockerfile$"
priority = 1
