Skip to content

Commit

Permalink
Warn about empty values
Browse files Browse the repository at this point in the history
  • Loading branch information
Famlam committed Dec 31, 2024
1 parent 1ca6f06 commit 15cefff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/TagFix_BadValue.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ def check(self, data, tags, check_list_open):
for k in keyss:
if tags[k] in ("unknown", "*"):
err.append({"class": 40613, "subclass": stablehash64(k), "text": T_("Concerns tag: `{0}`", '='.join([k, tags[k]])) })
elif len(tags[k].strip()) == 0 and k not in check_list_open and k not in self.check_list_closed:
err.append({"class": 3040, "subclass": stablehash64(k), "text": T_("Concerns tag: `{0}`", '='.join([k, tags[k]])) })

return err

Expand Down Expand Up @@ -158,6 +160,9 @@ def test(self):
{"sport": "rugby_union;shot-put;long-jump"}, # good;whitelisted;bad
{"access": "unknown"},
{"tracktype": "gradde1"},
{"leaf_cycle": ""},
{"wetland": ""},
{"random_key": ""},
]:
self.check_err(a.node(None, t), t)
self.check_err(a.way(None, t, None), t)
Expand Down

0 comments on commit 15cefff

Please sign in to comment.