Ticket #20960: josm_20960v2.patch
File josm_20960v2.patch, 9.6 KB (added by , 2 years ago) |
---|
-
resources/data/validator/combinations.mapcss
158 158 group: tr("missing tag"); 159 159 } 160 160 161 /* {0.tag} without {1.key} (warning level), #18411, #18246, #20530 */ 162 way[railway=construction][!construction], 163 way[highway=construction][!construction], 161 /* {0.tag} without {1.key} (warning level), #18411, #18246, #20530, #20960 */ 162 way[railway=construction][!construction][!construction:railway], 163 way[highway=construction][!construction][!construction:highway], 164 area[building=construction][!construction][!construction:building], 165 area[landuse=construction][!construction][!construction:landuse], 164 166 node[traffic_sign=maxspeed][!maxspeed][!/^maxspeed:.+/], 165 167 *[actuator=manual][!handle], 166 168 *[mechanical_driver=manual][!handle], … … 267 269 group: tr("missing tag"); 268 270 } 269 271 270 /* {0.key} without {1.key}, {2.key} or {3.key} */ 272 /* {0.key} without {1.key}, {2.key} or {3.key}, see #20960 */ 273 way[construction][!highway][!railway][!waterway]!:closed, 274 area[construction][!building][!highway][!landuse]:closed, 271 275 *[snowplowing][!highway][!amenity][!leisure] { 272 276 throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.key}", "{3.key}"); 273 277 group: tr("missing tag"); … … 307 311 group: tr("suspicious tag combination"); 308 312 } 309 313 310 /* {0.tag} together with {1.tag}, see #18411, #17950, #17330, #17623, #17592, #17594, #17542, #16861, #16147, #10186, #18815 */314 /* {0.tag} together with {1.tag}, see #18411, #17950, #17330, #17623, #17592, #17594, #17542, #16861, #16147, #10186, #18815, #20960 */ 311 315 *[barrier=kerb][kerb=no], 312 way[highway=construction][construction=yes], 313 way[railway=construction][construction=yes], 316 way[highway=construction][construction][construction=~/^(yes|minor|no)$/], 317 way[railway=construction][construction][construction=~/^(yes|minor|no)$/], 318 area[building=construction][construction][construction=~/^(yes|minor|no)$/], 319 area[landuse=construction][construction][construction=~/^(yes|minor|no)$/], 314 320 *[man_made=bridge][bridge=yes], 315 321 *[man_made=tunnel][tunnel=yes], 316 322 *[amenity=police][police], … … 435 441 assertMatch: "node place=foo addr:housenumber=5 addr:postcode=12345"; 436 442 assertNoMatch: "node place=foo addr:postcode=12345"; 437 443 } 438 *[ !highway][postal_code]["addr:postcode"][postal_code=*"addr:postcode"] {439 throwWarning: tr("{0} together with {1}", "{ 1.key}", "{2.key}");444 *[postal_code]["addr:postcode"][!highway][postal_code=*"addr:postcode"] { 445 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}"); 440 446 group: tr("suspicious tag combination"); 441 447 } 442 *[ !highway][postal_code]["addr:postcode"][postal_code!=*"addr:postcode"] {443 throwWarning: tr("{0} together with {1} and conflicting values", "{ 1.key}", "{2.key}");448 *[postal_code]["addr:postcode"][!highway][postal_code!=*"addr:postcode"] { 449 throwWarning: tr("{0} together with {1} and conflicting values", "{0.key}", "{1.key}"); 444 450 group: tr("suspicious tag combination"); 445 451 } 446 way[ highway][postal_code]["addr:postcode"][postal_code=*"addr:postcode"] {447 throwWarning: tr("{0} together with {1}", "{ 1.key}", "{2.key}");452 way[postal_code]["addr:postcode"][highway][postal_code=*"addr:postcode"] { 453 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}"); 448 454 group: tr("suspicious tag combination"); 449 455 fixRemove: "addr:postcode"; 450 456 } 451 way[ highway][postal_code]["addr:postcode"][postal_code!=*"addr:postcode"] {452 throwWarning: tr("{0} together with {1} and conflicting values", "{ 1.key}", "{2.key}");457 way[postal_code]["addr:postcode"][highway][postal_code!=*"addr:postcode"] { 458 throwWarning: tr("{0} together with {1} and conflicting values", "{0.key}", "{1.key}"); 453 459 group: tr("suspicious tag combination"); 454 460 } 455 way[highway][ highway!=services][highway!=rest_area][!postal_code]["addr:postcode"] {456 throwWarning: tr("{0} together with {1}", "{0.key}", "{ 4.key}");461 way[highway]["addr:postcode"][highway!=services][highway!=rest_area][!postal_code] { 462 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}"); 457 463 suggestAlternative: "postal_code"; 458 464 group: tr("suspicious tag combination"); 459 465 fixChangeKey: "addr:postcode=>postal_code"; … … 486 492 group: tr("suspicious tag combination"); 487 493 } 488 494 489 *[amenity][ amenity =~ /^(restaurant|cafe|fast_food|pub|place_of_worship|school|university|hospital|library|theatre|courthouse|bank|cinema|pharmacy|fuel)$/][!name][noname!=yes] {490 throwOther: tr("{0} without {1}", "{0.tag}", "{ 2.key}");495 *[amenity][!name][amenity =~ /^(restaurant|cafe|fast_food|pub|place_of_worship|school|university|hospital|library|theatre|courthouse|bank|cinema|pharmacy|fuel)$/][noname!=yes] { 496 throwOther: tr("{0} without {1}", "{0.tag}", "{1.key}"); 491 497 group: tr("missing tag"); 492 498 assertMatch: "node amenity=restaurant"; 493 499 assertNoMatch: "node amenity=restaurant noname=yes"; … … 613 619 } 614 620 615 621 /* #11837 */ 616 way[ layer][layer<0][bridge][bridge!=no][location!=underground][indoor!=yes][!tunnel],617 way[ layer][layer>0][tunnel][tunnel!=no][location!=overground][indoor!=yes][!bridge] {618 throwWarning: tr("{0} together with {1}", "{ 2.tag}", "{0.tag}");622 way[bridge][layer][layer<0][bridge!=no][location!=underground][indoor!=yes][!tunnel], 623 way[tunnel][layer][layer>0][tunnel!=no][location!=overground][indoor!=yes][!bridge] { 624 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}"); 619 625 group: tr("suspicious tag combination"); 620 626 } 621 627 … … 655 661 fixAdd: "unisex=yes"; 656 662 } 657 663 658 /* { 1.key} without {2.tag} see #13138, #14468 */659 way !:closed[water][natural!~/water|bay|strait/][water!=intermittent][amenity!=lavoir], /* water=intermittent is deprecated and has an own warning */660 area :closed[water][natural!~/water|bay|strait/][water!=intermittent][amenity!=lavoir]{661 throwWarning: tr("{0} without {1}", "{ 1.key}", "{2.tag}");664 /* {0.key} without {1.tag} see #13138, #14468 */ 665 way[water][natural!~/water|bay|strait/][water!=intermittent][amenity!=lavoir]!:closed, /* water=intermittent is deprecated and has an own warning */ 666 area[water][natural!~/water|bay|strait/][water!=intermittent][amenity!=lavoir]:closed { 667 throwWarning: tr("{0} without {1}", "{0.key}", "{1.tag}"); 662 668 group: tr("missing tag"); 663 669 } 664 670 … … 707 713 } 708 714 709 715 /* #10932, #19609 */ 710 way[ highway][!lanes][/^.*:lanes$/][!source:lanes],711 way[ highway][!lanes][/^.*:lanes:(forward|backward|both_ways)$/],712 way[ highway][!lanes:both_ways][/^.*:lanes:both_ways$/] {713 throwWarning: tr("{0} without {1}", "{ 2.key}", "{1.key}");716 way[/^.*:lanes$/][highway][!lanes][!source:lanes], 717 way[/^.*:lanes:(forward|backward|both_ways)$/][!lanes][highway], 718 way[/^.*:lanes:both_ways$/][!lanes:both_ways][highway] { 719 throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}"); 714 720 group: tr("missing tag"); 715 721 assertMatch: "way highway=primary turn:lanes=left|right"; 716 722 assertMatch: "way highway=primary turn:lanes:forward=left|right"; 717 723 assertNoMatch: "way highway=primary turn:lanes=left|right lanes=2"; 718 724 } 719 way[ highway][!lanes:forward][/^.*:lanes:forward$/][!lanes:backward][mod(tag(lanes),2)=0],720 way[ highway][!lanes:backward][/^.*:lanes:backward$/][!lanes:forward][mod(tag(lanes),2)=0] {721 throwOther: tr("{0} without {1}", "{ 2.key}", "{1.key}");725 way[/^.*:lanes:forward$/][!lanes:forward][!lanes:backward][highway][mod(tag(lanes),2)=0], 726 way[/^.*:lanes:backward$/][!lanes:backward][!lanes:forward][highway][mod(tag(lanes),2)=0] { 727 throwOther: tr("{0} without {1}", "{0.key}", "{1.key}"); 722 728 group: tr("missing tag"); 723 729 assertMatch: "way highway=primary turn:lanes:forward=left|right lanes=2"; 724 730 assertNoMatch: "way highway=primary turn:lanes:forward=left|right lanes:forward=2"; … … 837 843 assertNoMatch: "way construction:building=house construction=house"; 838 844 } 839 845 840 /* #18203 */ 841 way[construction][construction!=yes][construction!=minor][highway][highway!=construction] { 842 throwWarning: tr("{0} together with {1}", "{3.tag}", "{0.tag}"); 846 /* #18203, #20960 */ 847 way[highway][construction][construction!~/^(yes|minor|no)$/][highway!=construction], 848 way[railway][construction][construction!~/^(yes|minor|no)$/][railway!=construction], 849 area[building][construction][construction!~/^(yes|minor|no)$/][building!=construction], 850 area[landuse][construction][construction!~/^(yes|minor|no)$/][landuse!=construction] { 851 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}"); 843 852 group: tr("suspicious tag combination"); 844 853 } 845 854 … … 929 938 assertNoMatch: "way highway=primary placement:backward=middle_of:1 placement:forward=transition"; 930 939 assertNoMatch: "way highway=primary placement=middle_of:1 placement:backward=transition placement:forward=transition"; 931 940 } 932 way[ highway][placement][/^placement:.*$/]!.PlacementTransitionWarning,933 way[ highway]["placement:forward"]["placement:backward"]!.PlacementTransitionWarning,934 way[ highway]["placement:forward"]["placement:both_ways"]!.PlacementTransitionWarning,935 way[ highway]["placement:backward"]["placement:both_ways"]!.PlacementTransitionWarning {936 throwError: tr("{0} together with {1}", "{ 1.key}", "{2.key}");941 way[placement][/^placement:.*$/][highway]!.PlacementTransitionWarning, 942 way["placement:forward"]["placement:backward"][highway]!.PlacementTransitionWarning, 943 way["placement:forward"]["placement:both_ways"][highway]!.PlacementTransitionWarning, 944 way["placement:backward"]["placement:both_ways"][highway]!.PlacementTransitionWarning { 945 throwError: tr("{0} together with {1}", "{0.key}", "{1.key}"); 937 946 group: tr("suspicious tag combination"); 938 947 assertMatch: "way highway=primary placement=left_of:2 placement:forward=right_of:1"; 939 948 assertNoMatch: "way highway=primary placement:forward=right_of:1";