From af4ab2370ed0f1d2a0a88b5e10d073c7e6cbc588 Mon Sep 17 00:00:00 2001 From: Luke Petherbridge Date: Mon, 30 Oct 2023 17:34:23 -0700 Subject: [PATCH] chore(deps): removed cargo-husky --- .cargo-husky/hooks/commit-msg | 57 ----------------------------------- .cargo-husky/hooks/pre-push | 17 ----------- Cargo.toml | 5 --- 3 files changed, 79 deletions(-) delete mode 100755 .cargo-husky/hooks/commit-msg delete mode 100755 .cargo-husky/hooks/pre-push diff --git a/.cargo-husky/hooks/commit-msg b/.cargo-husky/hooks/commit-msg deleted file mode 100755 index daa54f61..00000000 --- a/.cargo-husky/hooks/commit-msg +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash - -# https://www.conventionalcommits.org/en/v1.0.0/ - -# list of Conventional Commits types -cc_types=("feat" "fix") -default_types=("build" "chore" "ci" "docs" "${cc_types[@]}" "perf" "refactor" "revert" "style" "test") -types=( "${cc_types[@]}" ) - -if [ $# -eq 1 ]; then - types=( "${default_types[@]}" ) -else - # assume all args but the last are types - while [ $# -gt 1 ]; do - types+=( "$1" ) - shift - done -fi - -# the commit message file is the last remaining arg -msg_file=$1 - -if [[ $(head -1 "$msg_file") =~ "Merge" ]]; then - exit 0; -fi - -# join types with | to form regex ORs -r_types="($(IFS='|'; echo "${types[*]}"))" -# optional (scope) -r_scope="(\([[:alnum:] \/-]+\))?" -# optional breaking change indicator and colon delimiter -r_delim='!?:' -# subject line, body, footer -r_subject=" [[:print:]].+" -# the full regex pattern -pattern="^$r_types$r_scope$r_delim$r_subject$" - -# Check if commit is conventional commit -if grep -Eq "$pattern" "$msg_file"; then - exit 0 -fi - -echo "[Commit message] $(head -1 $msg_file)" -echo " -Your commit message does not follow Conventional Commits formatting -https://www.conventionalcommits.org/ -Conventional Commits start with one of the below types, followed by a colon, -followed by the commit message: - $(IFS=' '; echo "${types[*]}") -Example commit message adding a feature: - feat: implement new API -Example commit message fixing an issue: - fix: remove infinite loop -Optionally, include a scope in parentheses after the type for more context: - fix(account): remove infinite loop -" -exit 1 diff --git a/.cargo-husky/hooks/pre-push b/.cargo-husky/hooks/pre-push deleted file mode 100755 index a6ae6089..00000000 --- a/.cargo-husky/hooks/pre-push +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -set -e -RUSTDOCFLAGS="-Dwarnings" -RUSTFLAGS="-Dwarnings" - -echo '+cargo +nightly test' -cargo +nightly test - -echo '+cargo +nightly test single_thread -- --test-threads=1 --ignored' -cargo +nightly test single_thread -- --test-threads=1 --ignored - -echo '+cargo +nightly clippy --all-targets -- -D warnings' -cargo +nightly clippy --all-targets - -echo '+cargo +nightly doc -- -D warnings' -cargo +nightly doc diff --git a/Cargo.toml b/Cargo.toml index 430108a5..a5ab14cc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,11 +37,6 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" structopt = "0.3" -[dev-dependencies.cargo-husky] -version = "1.5" -default-features = false -features = ["user-hooks"] - [target.'cfg(not(target_arch = "wasm32"))'.dependencies] pix-engine = { version = "0.8", features = ["serde"] }