1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-19 20:02:10 +00:00
seirdy.one/linter-configs/vnu_filter.jq
Rohan Kumar af1f494c29
Skip validating the search result page offline
That page contains raw Go templates. I should just validate the live
versions.
2022-07-13 22:10:15 -07:00

22 lines
767 B
Text

# Filter false positives from the .messages entry of Nu Validator output
.messages |= map(
. | select(
.type == "error" and
(
( # See https://github.com/w3c/css-validator/issues/361
.message == "CSS: Parse Error."
and .extract == "){outline:none}}@media(prefers"
and .hiliteLength == 1
)
or
( # See https://github.com/validator/validator/issues/1166
.message == "Attribute “media” not allowed on element “meta” at this point."
and (.extract | test(" name=\"theme-color\""))
)
or
( # the search page has raw templates, let those slide. I validate the final dynamic search page manually.
.url | test ("/search/index.")
)
) | not
)
) | del(..|select(. == [])) | del(..|select(. == {})) | select(. != null)