You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For cargo-husky users that are new to Rust and the cargo system, it might be unclear how to let updated cargo-husky feature changes in Cargo.toml also update the Git hooks.
For example, perform the following steps:
add
[dev-dependencies.cargo-husky]
version = "1"features = ["precommit-hook", "run-cargo-clippy"]
to Cargo.toml
invoke cargo test
notice that .git/hooks/pre-commit contains cargo clippy 👍
add "run-cargo-fmt" to the features in Cargo.toml
invoke cargo test
notice that .git/hooks/pre-commit does not contain cargo fmt 👎
My request is to update the README.md to make clear how to "activate" changed feature settings.
The text was updated successfully, but these errors were encountered:
[dev-dependencies.cargo-husky]
version = "^1"default-features = false# Disable features which are enabled by defaultfeatures = ["precommit-hook", "run-cargo-fmt", "run-for-all"]
❯ cargo clean # brix-rust -> ccushing/copy-1a ! $
❯ cargo test
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
❯ cat .git/hooks/pre-commit # brix-rust -> ccushing/copy-1a ! $
[bat error]: '.git/hooks/pre-commit': No such file or directory (os error 2)
For cargo-husky users that are new to Rust and the cargo system, it might be unclear how to let updated cargo-husky feature changes in
Cargo.toml
also update the Git hooks.For example, perform the following steps:
Cargo.toml
cargo test
.git/hooks/pre-commit
containscargo clippy
👍"run-cargo-fmt"
to the features inCargo.toml
cargo test
.git/hooks/pre-commit
does not containcargo fmt
👎My request is to update the README.md to make clear how to "activate" changed feature settings.
The text was updated successfully, but these errors were encountered: