Skip to content

Commit

Permalink
chore(lint-all): add custom rules for zhlint
Browse files Browse the repository at this point in the history
  • Loading branch information
inscripoem committed Dec 17, 2024
1 parent 5abcbf5 commit e7bfc38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
echo 0 > "$linted_failed_file"
find . -type f -name '*.md' | while read -r file; do
set +e
zhlint "$file"
zhlint --config "$GITHUB_WORKSPACE"/.scripts/.zhlintrc "$file"
if [ $? -ne 0 ]; then
echo 1 > "$linted_failed_file"
echo "$file" >> "$file_list"
output_file="linted_output/report_and_suggested_fixes/$file"
mkdir -p "$(dirname "$output_file")"
zhlint "$file" --output="$output_file" > "$output_file.log" 2>&1
zhlint --config "$GITHUB_WORKSPACE"/.scripts/.zhlintrc "$file" --output="$output_file" > "$output_file.log" 2>&1
fi
set -e
done
Expand Down
6 changes: 6 additions & 0 deletions .scripts/.zhlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"preset": "default",
"rules": {
"halfwidthPunctuation": "(),。、"
}
}

0 comments on commit e7bfc38

Please sign in to comment.