---
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: master
hooks:
- id: check-added-large-files
args: [--maxkb=500]
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: no-commit-to-branch
stages: [commit]
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: master
hooks:
- id: forbid-binary
exclude: |
(?x)^(
rsc/.*\.(png|gif)
)$
- id: markdownlint
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: master
hooks:
- id: yamlfmt
- repo: local
hooks:
- id: check-versions
name: Check all versions according to Cargo.toml
stages: [commit]
language: system
entry: ./compile.py update-versions
types_or: [toml, markdown, rust]
pass_filenames: false
- repo: https://github.com/doublify/pre-commit-rust
rev: master
hooks:
- id: fmt
- id: cargo-check
- id: clippy
- repo: local
hooks:
- id: execute-tests
name: Compile and execute unit and integration tests
stages: [commit]
language: system
entry: ./compile.py tests
types: [rust]
pass_filenames: false
- id: execute-tests-all-targets
name: Compile and execute unit and integration tests for all targets
stages: [commit]
language: system
entry: ./compile.py tests -a
types: [rust]
pass_filenames: false
- id: build-documentation
name: Build documentation
stages: [commit]
language: system
entry: ./compile.py doc
types: [rust]
pass_filenames: false
- id: publish
name: Prepare publishing to crates.io
stages: [push]
language: system
entry: ./compile.py publish -c
pass_filenames: false