Crates.io | xtools |
lib.rs | xtools |
version | 0.0.0 |
source | src |
created_at | 2020-07-31 09:32:47.944754 |
updated_at | 2020-07-31 09:32:47.944754 |
description | A binary used for cross-platform git hooks. |
homepage | https://github.com/SirWindfield/xtools |
repository | https://github.com/SirWindfield/xtools |
max_upload_size | |
id | 271589 |
size | 19,018 |
Git hooks written in Rust and delivered as a git submodule.
Usually, I add the binary as a workspace member to a project of mine. You can register it as a git submodule as well, allowing you to keep the local copy up-to-date with the remote version. You can then setup an alias inside your .cargo/config
folder:
xtools = "run --package xtools --bin xtools --"
This allows you to run the utility binary using cargo xtools
.
xtools
provides some utility binaries that can be used to create custom git hooks. Here is a (non-exhaustive) list:
pre-commit
that checks that cargo clippy && cargo fmt -- --check
succeed without errors.To modify the git hooks and run custom flows, you can simply modify the source code. The hooks get compiled alongside your Rust project, which creates a natural development environment for your git hooks.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.