1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-19 20:02:10 +00:00
seirdy.one/scripts/filter-vnu.sh
Rohan Kumar 838d73ed22
Reduce zopfli level, switch from jq to jaq
jaq is faster and more strict which is exactly what I want. zopfli level
9 is overkill and takes almost twice as long for barely any difference.
2023-08-27 14:31:32 -07:00

13 lines
320 B
Bash

#!/bin/sh
# filters the Nu HTML Validator's JSON output. Operates on stdin.
set -e -u
root_dir="$(dirname "$0")/.."
vnu_output="$(jaq --from-file "$root_dir/linter-configs/vnu_filter.jq")"
if [ "$vnu_output" = '' ]; then
echo "All markup is valid"
else
echo "Markup errors found!" 1>&2
echo "$vnu_output"
exit 1
fi