Skip to content

Commit

Permalink
chore: set up pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
chrjabs committed Oct 31, 2024
1 parent 9682aaa commit ef8f5df
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
exclude: .+\.(patch|log)$
- id: end-of-file-fixer
exclude: .+\.(patch|log)$
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format
- repo: local
hooks:
- id: cargo-check
name: Check cargo workspace
description: Check the cargo workspace for errors
entry: cargo check --workspace
language: system
files: (.+\.rs|.*Cargo.(toml|lock))$
pass_filenames: false
- id: cargo-fmt
name: Format cargo workspace
description: Format the cargo workspace
entry: cargo fmt --all
language: system
files: src/.+\.rs$
pass_filenames: false
- id: cargo-spellcheck
name: Spellchecking documentation
entry: cargo spellcheck --code 1
language: system
files: (.+\.rs|docs/.+\.md)$

0 comments on commit ef8f5df

Please sign in to comment.