提交pre_commit

main
刘涛 2024-10-08 19:34:05 +08:00
parent 61e0301e92
commit cfb986b8ec
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ check_commit() {
fi
# 只对Code文件夹下的文件进行检查
if [[ $FILE == *"ProjectNLD/Assets/Code/"* ]]; then
git diff --cached --unified=0 "$FILE" | grep -v '^-' | grep -q "using NPOI.SS.Formula.Functions"
git diff --cached --unified=0 "$FILE" | grep -v '^-' | grep -q "using NPOI.SS.Formula.Functions" | grep -q "using dblib.DotNet.MD"
if [ $? -eq 0 ]; then
echo "Code 提交失败: $FILE 包含'using NPOI.SS.Formula.Functions'内容"
return 1