sloughi
بواسطة @01walid
29
Shareable git hooks for Rust project. Sloughi is a friend of Husky from North Africa! :algeria:
عن هذا المشروع
Sloughi A tiny crate to make it easy to share and apply Git hooks for Rust projects. Inspired by Husky. Zero dependencies. No magic, uses Git's config core.hooksPath to set a custom hooks path. Use native/regular shell scripts for git hooks. Makes use of Cargo's build script. IDE/Code editor agnostic. Customizable setup. Sloughi is an ancient breed of domesticated dog originating from North Africa (i.e. Algeria, where I live 👋). Install Add sloughi to your build-dependencies (not dev-dependencies): Create a build.rs file at the root of your project to install Sloughi (besides Cargo.toml, not inside src/): That's it! The next time cargo build is triggered (by VSCode, or by running cargo run/cargo test), you will notice a .sloughi folder is created with a sample pre-commit hook inside. Customizing the install This crate uses the builder pattern, you can chain options on top ::new() to adjust the install: Fail the build The above snippets for build.rs will not interrupt the build in case Sloughi install failed (e.g. not a git repo, permission error ..etc). It's explicitly silenced with let =, you can handle the error however you like, or just yell with: F.A.Q Why use build.rs?
من ملف README الخاص بالمشروع على GitHub
- النجوم
- 29
- التفريعات
- 2
- الرخصة
- Apache-2.0
- آخر تحديث
- 28/03/2022
أضف هذه الشارة إلى ملف README
أظهر أن مشروعك مُدرج على «صُنع في الجزائر».
[](https://www.madeinalgeria.dev/projects/sloughi)