From 5da59c36c77e840312db041e93145a1ec2df5d69 Mon Sep 17 00:00:00 2001 From: Ciphercat <78522797+0xrsydn@users.noreply.github.com> Date: Thu, 5 Mar 2026 18:32:48 +0000 Subject: [PATCH] ci: convert prek.toml to .pre-commit-config.yaml (prek 0.3 compat) --- .pre-commit-config.yaml | 30 ++++++++++++++++++++++++++++++ prek.toml | 34 ---------------------------------- 2 files changed, 30 insertions(+), 34 deletions(-) create mode 100644 .pre-commit-config.yaml delete mode 100644 prek.toml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..d4a4a19 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,30 @@ +repos: + - repo: builtin + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-merge-conflict + + - repo: local + hooks: + - id: cargo-fmt + name: cargo fmt + entry: cargo fmt --check + language: system + types: [rust] + pass_filenames: false + + - id: cargo-clippy + name: cargo clippy + entry: cargo clippy -- -D warnings + language: system + types: [rust] + pass_filenames: false + + - id: cargo-test + name: cargo test + entry: cargo nextest run + language: system + types: [rust] + pass_filenames: false + stages: [pre-push] diff --git a/prek.toml b/prek.toml deleted file mode 100644 index c63f65e..0000000 --- a/prek.toml +++ /dev/null @@ -1,34 +0,0 @@ -# prek.toml — pre-commit & pre-push hooks for idx-cli - -[[repos]] -repo = "builtin" -hooks = [ - { id = "trailing-whitespace" }, - { id = "end-of-file-fixer" }, - { id = "check-merge-conflict" }, -] - -[[repos]] -repo = "local" - -[[repos.hooks]] -id = "cargo-fmt" -name = "cargo fmt" -entry = "cargo fmt --check" -language = "system" -types = ["rust"] -pass_filenames = false - -[[repos.hooks]] -id = "cargo-clippy" -name = "cargo clippy" -entry = "cargo clippy -- -D warnings" -language = "system" -types = ["rust"] -pass_filenames = false - -[[repos]] -repo = "local" -hooks = [ - { id = "cargo-test", name = "cargo test", entry = "cargo nextest run", language = "system", types = ["rust"], pass_filenames = false, stages = ["pre-push"] }, -]