1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-23 21:02:09 +00:00

Stricter feed validation false-positive filtering

This commit is contained in:
Rohan Kumar 2023-08-27 14:31:42 -07:00
parent 838d73ed22
commit afcc4fd760
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -52,16 +52,15 @@ run_validator() {
} }
validate_feed() { validate_feed() {
# silence "self reference doesn't match" because i'm testing a localhost copy.
# entries with the same timestamp isn't a big deal
# unregistered link relationship is a false positive caused by an unknown namespace (rel-mentioned).
rel_mention_string="Unregistered link relationship \($rel_mention_count occurrence" rel_mention_string="Unregistered link relationship \($rel_mention_count occurrence"
if [ "$rel_mention_count" = '1' ]; then if [ "$rel_mention_count" = '1' ]; then
rel_mention_string="Unregistered link relationship" rel_mention_string="Unregistered link relationship"
fi fi
# silence "self reference doesn't match" because i'm testing a localhost copy. full_regex="Use of unknown namespace|Self reference doesn't match|$rel_mention_string|entries with the same value for atom:updated|Validating $url"
# 'should not contian" has a false positive triggered by ARIA
# entries with the same timestamp isn't a big deal
# unregistered link relationship is a false positive caused by an unknown namespace.
full_regex="Use of unknown namespace|Self reference doesn't match|$rel_mention_string|entries with the same value|Validating $url"
run_validator \ run_validator \
| grep -Ev "$full_regex" | grep -Ev "$full_regex"