# Lint/format the `ski` crate (this repo). Scoped by `files:` so the hooks
# only fire when Rust sources change; everything else is unaffected. Requires
# cargo on PATH (rustup). The hooks pin `--no-default-features` to stay offline
# (no model download); the default `fastembed` lane runs in CI for the real embedder.
# `default_install_hook_types` makes a plain `pre-commit install` wire BOTH the
# pre-commit stage (fmt/clippy below) and the commit-msg stage (Conventional
# Commits check) — the latter keeps subjects machine-parseable for release notes.
default_install_hook_types:
repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.4.0
hooks:
- id: conventional-pre-commit
stages:
- repo: local
hooks:
- id: ski-fmt
name: cargo fmt (ski)
entry: cargo fmt --all -- --check
language: system
files: \.rs$
pass_filenames: false
- id: ski-clippy
name: cargo clippy (ski)
entry: cargo clippy --all-targets --no-default-features -- -D warnings
language: system
files: \.rs$
pass_filenames: false