Add cargo clippy and cargo fmt to pre-commit hooks #413

Merged
sb10q merged 5 commits from misc/workflow-updates into master 2024-06-12 16:12:19 +08:00
1 changed files with 24 additions and 0 deletions
Showing only changes of commit 79c8b759ad - Show all commits

24
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,24 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_stages: [commit]
repos:
- repo: local
hooks:
- id: nac3-cargo-fmt
name: nac3 cargo format
entry: cargo
language: system
types: [file, rust]
pass_filenames: false
description: Runs cargo fmt on the codebase.
args: [fmt]
- id: nac3-cargo-clippy
name: nac3 cargo clippy
entry: cargo
language: system
types: [file, rust]
pass_filenames: false
description: Runs cargo clippy on the codebase.
args: [clippy]