From 2f66047a76c9c632f83bb1b09429737998f42172 Mon Sep 17 00:00:00 2001 From: Glyphack Date: Thu, 2 May 2024 15:01:19 +0200 Subject: [PATCH] feat: pre commits --- .pre-commit-config.yaml | 43 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..e751a7aa --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,43 @@ +fail_fast: true + +exclude: | + (?x)^( + )$ + +repos: + - repo: https://github.com/executablebooks/mdformat + rev: 0.7.17 + hooks: + - id: mdformat + additional_dependencies: + - mdformat-mkdocs + - mdformat-admon + exclude: | + (?x)^( + docs/formatter/black\.md + | docs/\w+\.md + )$ + + - repo: https://github.com/igorshubovych/markdownlint-cli + rev: v0.39.0 + hooks: + - id: markdownlint-fix + exclude: | + (?x)^( + docs/formatter/black\.md + | docs/\w+\.md + )$ + + - repo: https://github.com/crate-ci/typos + rev: v1.20.8 + hooks: + - id: typos + + - repo: local + hooks: + - id: cargo-fmt + name: cargo fmt + entry: cargo fmt -- + language: system + types: [rust] + pass_filenames: false # This makes it a lot faster