Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mo3et committed Aug 11, 2024
1 parent 369f850 commit 9679e14
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/comment-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@ jobs:
--exclude="$EXCLUDE_FILES" \
|| true | tee -a $output_file
# 如果发现了中文注释,输出注释内容及其位置
# 如果发现了中文注释,输出注释内容及其位置,并退出
if [ -s "$output_file" ]; then
echo "Chinese comments found in the following locations:"
cat "$output_file"
exit 1
exit 1 # 退出并标记为失败
else
echo "No Chinese comments found."
fi
# 如果没有找到中文注释,则输出以下内容
echo "No Chinese comments found."
- name: Fail step if Chinese comments were found
if: failure()
run: exit 1

0 comments on commit 9679e14

Please sign in to comment.