| | 593 | /* #19094 */ |
| | 594 | way[highway][placement=transition][join_list("", uniq_list(tag_regex("^placement:.*$")))==transition], |
| | 595 | way[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 | } |
| | 608 | way[highway][placement][/^placement:.*$/]!.PlacementTransitionWarning, |
| | 609 | way[highway]["placement:forward"]["placement:backward"]!.PlacementTransitionWarning, |
| | 610 | way[highway]["placement:forward"]["placement:both_ways"]!.PlacementTransitionWarning, |
| | 611 | way[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 | |