cargo-leet 0.4.0

Utility program to help with working on leetcode locally
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

regex="^(feat|fix|build|chore|ci|docs|style|refactor|perf|test|revert)(\[.+\])?: .+"

grep -E "$regex" "$1"
if [ $? != 0 ]
then
    echo "[error] Commit message doesn't appear to in the conventional commit format"
    echo "[info] expecting \"<type>[optional scope]: <description>\""
    echo "[info] see https://www.conventionalcommits.org/en/v1.0.0/#summary for more info"
    echo "[debug] using regex: \"$regex\""
    echo "[debug] on commit message:"
    cat "$1"
    exit 1
fi