Closed simevo closed 2 years ago
Sorry I did not realize that you have to --ignore
/ --ignore-re
all messages even informative ones ... this command works for me:
html5validator --ignore-re "(.*Attribute .x-.* not allowed on element.*|From line.*)" --ignore "Document checking completed" --root qq/ --also-check-css --format text --log INFO
I think that needed to use --ignore "Document checking completed"
should be noted in the docs; this is not intuitive, because you don't normally need to ignore this message to get a 0 exit code on success.
If I run
html5validator
(installed with pip in a virtualenv on Debian 11) against a dummy HTML file:returns:
and
echo $?
yields 0.But if I add
<div x-data="stationsMap"></div>
inside the body and--ignore-re ".*Attribute .x-.* not allowed on element.*"
to the comand line to ignore thex-data
attribute it returns:but
echo $?
yields 2.Also reproducible with
docker run --rm -it -v "$PWD/qq:/qq" cyb3rjak3/html5validator:latest-alpine html5validator --root /qq/ --also-check-css --format text --ignore-re ".*Attribute .x-.* not allowed on element.*" --log INFO
Thanks!