2021-06-27 19:07:59 +02:00
|
|
|
---
|
|
|
|
repos:
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2023-10-23 00:18:38 +02:00
|
|
|
rev: v4.5.0
|
2021-06-27 19:07:59 +02:00
|
|
|
hooks:
|
|
|
|
- id: check-yaml
|
|
|
|
- id: check-json
|
|
|
|
- id: check-toml
|
2023-02-08 17:13:14 +01:00
|
|
|
- id: mixed-line-ending
|
|
|
|
args: ["--fix=no"]
|
2021-06-27 19:07:59 +02:00
|
|
|
- id: end-of-file-fixer
|
2021-09-18 19:49:44 +02:00
|
|
|
exclude: "(.*js$|.*css$)"
|
2021-06-27 19:07:59 +02:00
|
|
|
- id: check-case-conflict
|
|
|
|
- id: check-merge-conflict
|
|
|
|
- id: detect-private-key
|
2023-02-08 17:13:14 +01:00
|
|
|
- id: check-symlinks
|
|
|
|
- id: forbid-submodules
|
2021-06-27 19:07:59 +02:00
|
|
|
- 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 18:51:24 +01:00
|
|
|
args: ["--features", "sqlite,mysql,postgresql,enable_mimalloc", "--"]
|
2022-06-20 16:26:41 +02:00
|
|
|
types_or: [rust, file]
|
2022-12-15 17:15:48 +01:00
|
|
|
files: (Cargo.toml|Cargo.lock|rust-toolchain|.*\.rs$)
|
2021-06-27 19:07:59 +02:00
|
|
|
pass_filenames: false
|
|
|
|
- id: cargo-clippy
|
|
|
|
name: cargo clippy
|
|
|
|
description: Lint Rust sources
|
|
|
|
entry: cargo clippy
|
|
|
|
language: system
|
2022-03-20 18:51:24 +01:00
|
|
|
args: ["--features", "sqlite,mysql,postgresql,enable_mimalloc", "--", "-D", "warnings"]
|
2022-06-20 16:26:41 +02:00
|
|
|
types_or: [rust, file]
|
2023-02-08 17:13:14 +01:00
|
|
|
files: (Cargo.toml|Cargo.lock|rust-toolchain|clippy.toml|.*\.rs$)
|
2021-06-27 19:07:59 +02:00
|
|
|
pass_filenames: false
|