Skip to content

Commit

Permalink
chore: add hakari pre-commit hook
Browse files Browse the repository at this point in the history
Signed-off-by: iGxnon <[email protected]>
  • Loading branch information
iGxnon committed Nov 24, 2023
1 parent 3d078c5 commit 3203d69
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .config/hakari.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ unify-target-host = "unify-if-both"

[traversal-excludes]
third-party = [
# Why regex and prost might be compile multipy times?
# Why regex and prost might be compile multiply times?
{ name = "regex" },
{ name = "prost" },
]
10 changes: 8 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,15 @@ repos:
stages: [ commit-msg ]
- id: cargo-sort
name: Check Cargo.toml is sorted
description: 'Ensure Cargo.toml is sorted'
description: Ensure Cargo.toml is sorted
entry: bash -c 'cargo sort --workspace'
language: rust
types: [ file, toml ]
files: Cargo\.toml
pass_filenames: false
- id: cargo-hakari
name: Check if workspace-hack works correctly
description: Ensure workspace-hack works correctly
entry: bash -c 'cargo hakari generate --diff && cargo hakari manage-deps --dry-run && cargo hakari verify'
language: rust
files: Cargo\.(toml|lock)
pass_filenames: false

0 comments on commit 3203d69

Please sign in to comment.