Tiraya/.pre-commit-config.yaml

28 lines
696 B
YAML

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: end-of-file-fixer
- repo: https://github.com/cathiele/pre-commit-rust
rev: v0.1.0
hooks:
- id: cargo-fmt
- id: cargo-clippy
args: ["--all", "--tests", "--", "-D", "warnings"]
- repo: local
hooks:
- id: sqlx-prepare
name: sqlx prepare
entry: just sqlx-prepare
language: system
types: [rust]
pass_filenames: false
files: '^crates/db/'
- id: clean-sql
name: clean sql
entry: scripts/clean_sql.py
language: python
files: '^crates/db/migrations/'
types: [sql]