mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-12-18 06:42:10 +00:00
cb26956bca
- I forgot to compress xhtml files. fix that. - Stylistic change: remove unnecessary brace expansions - Don't repeatedly append to a file; run commands in a different scope and write all at once. Move Nu HTML validator filtering into a shell script: - Return a bad exit code if validation errors are found after filtering - Remove null-ish values from the JSON output; the final output *should* be an empty string, since nothing should be reported.
13 lines
319 B
Bash
13 lines
319 B
Bash
#!/bin/sh
|
|
# filters the Nu HTML Validator's JSON output. Operates on stdin.
|
|
set -e -u
|
|
|
|
root_dir="$(dirname "$0")/.."
|
|
vnu_output="$(jq --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
|