#11330 closed enhancement (fixed)
add validator warning for short keys
Reported by: | Klumbumbus | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 15.04 |
Component: | Core validator | Version: | |
Keywords: | Cc: | bastiK |
Description
follow up from #11234
we should warn about keys with 1 or 2 characters as these are mostly typos, except to
(used in route relations).
I think we should not allow id
, since this is not documented in the wiki and mostly part of local imports or should be ref
instead.
the 2 following mapcss syntaxes do not work however:
*[/.{1,2}/] { throwWarning: tr("uncommon short key"); }
*[/.?.?/] { throwWarning: tr("uncommon short key"); }
Attachments (0)
Change History (18)
comment:1 by , 10 years ago
Cc: | added |
---|
comment:2 by , 10 years ago
follow-up: 6 comment:3 by , 10 years ago
Hi all :),
what about …
*[/^.$/], *[/^..$/] { throwWarning: tr("uncommon short key"); }
comment:6 by , 10 years ago
follow-up: 8 comment:7 by , 10 years ago
Is "uncommon short key" proper English?
Also, should the "to" be restricted to only occur in relations? Can mapCSS distinguish the object type?
follow-ups: 10 13 comment:8 by , 10 years ago
Replying to aceman:
Is "uncommon short key" proper English?
I don't know :)
Also, should the "to" be restricted to only occur in relations? Can mapCSS distinguish the object type?
Yes it can. For sure we can warn also for to
on nodes. I'm not sure about ways. It is not documented, but it seems it is (geographically limited) used on some power cables, see http://taginfo.openstreetmap.org/keys/to?filter=ways#map
comment:9 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
follow-up: 11 comment:10 by , 10 years ago
Replying to Klumbumbus:
Replying to aceman:
Is "uncommon short key" proper English?
I don't know :)
"unusually short key" or something else with -ly suffix would seem more proper to me.
Also, should the "to" be restricted to only occur in relations? Can mapCSS distinguish the object type?
Yes it can. For sure we can warn also for
to
on nodes. I'm not sure about ways.
It seems the current patch will NOT warn for nodes. Or any objects with "to". Making it NOT warn only on relations is the proposal.
comment:11 by , 10 years ago
Replying to aceman:
It seems the current patch will NOT warn for nodes. Or any objects with "to". Making it NOT warn only on relations is the proposal.
Yes, thats what I mean. What I tried to say was that some people think that to
is also valid for ways.
comment:13 by , 10 years ago
Replying to Klumbumbus:
I'm not sure about ways. It is not documented, but it seems it is (geographically limited) used on some power cables, see http://taginfo.openstreetmap.org/keys/to?filter=ways#map
That is bad tagging as this information should be either on a relation or simply taken from data as the destination would be any power=substation at the end of the lines.
+1 for warning on ways, too.
comment:14 by , 10 years ago
Can someone help with the correct english phrase?
- uncommon short key
- unusually short key
- ...
?
follow-up: 17 comment:16 by , 10 years ago
Please, why do you do changes in unrelated tickets? And why is 'clothes' removed, now that localizers have done the work of translating the values? What is controversial in it?
This isn't possible at the moment. We'd need a MapCSS extension or a custom validator test class.