Ticket #19094: josm_19094.patch

File josm_19094.patch, 2.3 KB (added by skyper, 9 months ago)

patch including warnings about multiple use and transition with placement:*

  • resources/data/validator/combinations.mapcss

     
    590590    group: tr("suspicious tag combination");
    591591}
    592592
     593/* #19094 */
     594way[highway][placement=transition][join_list("", uniq_list(tag_regex("^placement:.*$")))==transition],
     595way[highway][!placement][/^placement:.*$/][join_list("", uniq_list(tag_regex("^placement:.*$")))==transition] {
     596  throwWarning: tr("Use `transition` only as value of `placement=*`");
     597  group: tr("suspicious tag combination");
     598  set PlacementTransitionWarning;
     599  fixAdd: "placement=transition;
     600  fixRemove: "placement:forward";
     601  fixRemove: "placement:backward";
     602  fixRemove: "placement:both_ways";
     603  assertMatch: "way highway=primary placement=transition placement:both_ways=transition";
     604  assertMatch: "way highway=primary placement:backward=transition placement:forward=transition";
     605  assertNoMatch: "way highway=primary placement:backward=middle_of:1 placement:forward=transition";
     606  assertNoMatch: "way highway=primary placement=middle_of:1 placement:backward=transition placement:forward=transition";
     607}
     608way[highway][placement][/^placement:.*$/]!.PlacementTransitionWarning,
     609way[highway]["placement:forward"]["placement:backward"]!.PlacementTransitionWarning,
     610way[highway]["placement:forward"]["placement:both_ways"]!.PlacementTransitionWarning,
     611way[highway]["placement:backward"]["placement:both_ways"]!.PlacementTransitionWarning {
     612  throwError: tr("`{0}` together with `{1}`. Use only one", "{1.key}", "{2.key}");
     613  group: tr("suspicious tag combination");
     614  assertMatch: "way highway=primary placement=left_of:2 placement:forward=right_of:1";
     615  assertNoMatch: "way highway=primary placement:forward=right_of:1";
     616  assertNoMatch: "way highway=primary placement:forward=transition placement:both_ways=transition";
     617}
     618
    593619/* #13680 */
    594620area[golf=bunker][natural=beach] {
    595621  throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
     
    747773  assertNoMatch: "node man_made=communications_tower height=\"328.22 ft\"";
    748774  assertNoMatch: "node man_made=communications_tower height=4358'8\"";
    749775  assertNoMatch: "node height=4358'";
    750 }
    751  No newline at end of file
     776}