source: josm/trunk/data/validator/unnecessary.mapcss@ 14686

Last change on this file since 14686 was 14593, checked in by Klumbumbus, 6 years ago

fix #15774 - Update emergency=fire_hydrant preset (based on patch by elgolfo and bus-mt), add a bunch of validator checks

  • Property svn:eol-style set to native
File size: 2.4 KB
Line 
1*[access][highway=proposed],
2*[motor_vehicle?][vehicle!=no][access!=no][bicycle_road!=yes][highway =~ /^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential|service|living_street)$/],
3*[bridge=no],
4*[building=no],
5*[elevation="0"],
6*[layer="0"] {
7 /* see #9365 - Useless tag layer=0 */
8 throwWarning: tr("{0} is unnecessary", "{0.tag}");
9 group: tr("unnecessary tag");
10 fixRemove: "{0.key}";
11 assertMatch: "way layer=0";
12 assertMatch: "way bridge=no";
13 assertMatch: "way highway=proposed access=no";
14}
15
16area:closed[amenity ][area?][!highway],
17area:closed[building][area?],
18area:closed[landuse ][area?][!highway],
19area:closed[leisure ][area?][!highway][leisure!=track][leisure!=slipway],
20area:closed[natural ][area?],
21area:closed[shop ][area?] {
22 throwWarning: tr("{0} is unnecessary for {1}", "{2.key}", "{1.key}");
23 group: tr("unnecessary tag");
24 fixRemove: "{2.key}";
25}
26
27/* #14256, #15664 */
28area:closed[highway=rest_area][area?],
29area:closed[highway=services][area?],
30area:closed[aeroway=aerodrome][area?],
31area:closed[aeroway=helipad][area?] {
32 throwWarning: tr("{0} is unnecessary for {1}", "{2.key}", "{1.tag}");
33 group: tr("unnecessary tag");
34 fixRemove: "{2.key}";
35}
36
37*[emergency=permissive] {
38 /* see #9458 - emergency=permissive makes no sense */
39 throwWarning: tr("{0} makes no sense", "{0.tag");
40 fixAdd: "emergency=yes";
41 assertMatch: "way emergency=permissive";
42 assertNoMatch: "way emergency=designated";
43}
44
45/* see ticket #7639 -- Warn when a node has the same tags as its parent way. */
46way >:sameTags node:tagged {
47 throwWarning: tr("Nodes duplicating parent way tags");
48}
49
50/* #15477 */
51*[payment:cash][payment:coins][payment:notes] {
52 throwWarning: tr("{0} together with {1} and {2}. Remove {0}.", "{0.key}", "{1.key}", "{2.key}");
53 group: tr("unnecessary tag");
54 fixRemove: "payment:cash";
55}
56
57/* see #10346, #15667 */
58way[waterway][oneway?] {
59 throwWarning: tr("{0} is unnecessary for {1}", "{1.key}", "{0.key}");
60 group: tr("unnecessary tag");
61 fixRemove: "{1.key}";
62}
63way[waterway][oneway=-1] {
64 throwWarning: tr("{0} is unnecessary for {1}. The flow direction is defined by the way direction.", "{1.key}", "{0.key}");
65 group: tr("unnecessary tag");
66}
67
68/* #15774 */
69node[emergency=fire_hydrant][fire_hydrant:count=1] {
70 throwWarning: tr("{0} is unnecessary for {1}", "{1.tag}", "{0.tag}");
71 group: tr("unnecessary tag");
72 fixRemove: "{1.key}";
73}
Note: See TracBrowser for help on using the repository browser.