@@ -7,35 +7,35 @@ vale docs/ \
77
88# Check if vale-report.json is valid JSON
99if ! jq empty vale-report.json 2> /dev/null; then
10- echo " ❌ Error: Vale did not produce valid JSON output"
10+ echo " Error: Vale did not produce valid JSON output"
1111 echo " "
1212 echo " Vale output:"
1313 cat vale-report.json
1414 exit 1
1515fi
1616
1717echo " ================================================"
18- echo " 📝 Vale Report - $( date ' +%Y-%m-%d' ) "
18+ echo " Vale Report - $( date ' +%Y-%m-%d' ) "
1919echo " ================================================"
2020echo " "
2121
2222WARNINGS=$( jq ' [.[] | .[] | select(.Severity == "warning")] | length' vale-report.json)
2323SUGGESTIONS=$( jq ' [.[] | .[] | select(.Severity == "suggestion")] | length' vale-report.json)
2424
25- echo " ⚠️ Warnings: $WARNINGS "
26- echo " 💡 Suggestions: $SUGGESTIONS "
25+ echo " Warnings: $WARNINGS "
26+ echo " Suggestions: $SUGGESTIONS "
2727echo " "
2828
29- echo " 📋 Top Warning Rules:"
29+ echo " Top Warning Rules:"
3030jq -r ' [.[] | .[] | select(.Severity == "warning") | .Check] | group_by(.) | map({rule: .[0], count: length}) | sort_by(-.count) | .[:5] | .[] | "\(.count)\t\(.rule)"' vale-report.json | column -t -s $' \t '
3131echo " "
3232
33- echo " 📁 Top Files to Fix:"
33+ echo " Top Files to Fix:"
3434jq -r ' to_entries | map({file: .key, count: [.value[] | select(.Severity == "warning")] | length}) | map(select(.count > 0)) | sort_by(-.count) | .[:15] | .[] | "\(.count)\t\(.file)"' vale-report.json | column -t -s $' \t '
3535echo " "
3636
3737echo " ================================================"
38- echo " ✅ To fix a file:"
38+ echo " To fix a file:"
3939echo " vale docs/path/to/file.md"
4040echo " vim docs/path/to/file.md"
41- echo " ================================================"
41+ echo " ================================================"
0 commit comments