2021-06-27 17:07:59 +00:00
|
|
|
---
|
|
|
|
repos:
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2022-06-08 17:46:33 +00:00
|
|
|
rev: v4.3.0
|
2021-06-27 17:07:59 +00:00
|
|
|
hooks:
|
|
|
|
- id: check-yaml
|
|
|
|
- id: check-json
|
|
|
|
- id: check-toml
|
|
|
|
- id: end-of-file-fixer
|
2021-09-18 17:49:44 +00:00
|
|
|
exclude: "(.*js$|.*css$)"
|
2021-06-27 17:07:59 +00:00
|
|
|
- id: check-case-conflict
|
|
|
|
- id: check-merge-conflict
|
|
|
|
- id: detect-private-key
|
|
|
|
- repo: local
|
|
|
|
hooks:
|
|
|
|
- id: fmt
|
|
|
|
name: fmt
|
|
|
|
description: Format files with cargo fmt.
|
|
|
|
entry: cargo fmt
|
|
|
|
language: system
|
|
|
|
types: [rust]
|
|
|
|
args: ["--", "--check"]
|
|
|
|
- id: cargo-test
|
|
|
|
name: cargo test
|
|
|
|
description: Test the package for errors.
|
|
|
|
entry: cargo test
|
|
|
|
language: system
|
2022-03-20 17:51:24 +00:00
|
|
|
args: ["--features", "sqlite,mysql,postgresql,enable_mimalloc", "--"]
|
2022-06-20 14:26:41 +00:00
|
|
|
types_or: [rust, file]
|
|
|
|
files: (Cargo.toml|Cargo.lock|.*\.rs$)
|
2021-06-27 17:07:59 +00:00
|
|
|
pass_filenames: false
|
|
|
|
- id: cargo-clippy
|
|
|
|
name: cargo clippy
|
|
|
|
description: Lint Rust sources
|
|
|
|
entry: cargo clippy
|
|
|
|
language: system
|
2022-03-20 17:51:24 +00:00
|
|
|
args: ["--features", "sqlite,mysql,postgresql,enable_mimalloc", "--", "-D", "warnings"]
|
2022-06-20 14:26:41 +00:00
|
|
|
types_or: [rust, file]
|
|
|
|
files: (Cargo.toml|Cargo.lock|.*\.rs$)
|
2021-06-27 17:07:59 +00:00
|
|
|
pass_filenames: false
|