Changeset 18397 in josm for trunk/resources/data


Ignore:
Timestamp:
2022-03-13T13:30:51+01:00 (3 years ago)
Author:
stoecker
Message:

fix #20960 - patch by skyper - validator fixes with construction tag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/resources/data/validator/combinations.mapcss

    r18370 r18397  
    161161}
    162162
    163 /* {0.tag} without {1.key} (warning level), #18411, #18246, #20530 */
    164 way[railway=construction][!construction],
    165 way[highway=construction][!construction],
     163/* {0.tag} without {1.key} (warning level), #18411, #18246, #20530, #20960 */
     164way[railway=construction][!construction][!construction:railway],
     165way[highway=construction][!construction][!construction:highway],
     166area[building=construction][!construction][!construction:building],
     167area[landuse=construction][!construction][!construction:landuse],
    166168node[traffic_sign=maxspeed][!maxspeed][!/^maxspeed:.+/],
    167169*[actuator=manual][!handle],
     
    270272}
    271273
    272 /* {0.key} without {1.key}, {2.key} or {3.key} */
     274/* {0.key} without {1.key}, {2.key} or {3.key}, see #20960 */
     275way[construction][!highway][!railway][!waterway]!:closed,
     276area[construction][!building][!highway][!landuse]:closed,
    273277*[snowplowing][!highway][!amenity][!leisure] {
    274278  throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.key}", "{3.key}");
     
    310314}
    311315
    312 /* {0.tag} together with {1.tag}, see #18411, #17950, #17330, #17623, #17592, #17594, #17542, #16861, #16147, #10186, #18815 */
     316/* {0.tag} together with {1.tag}, see #18411, #17950, #17330, #17623, #17592, #17594, #17542, #16861, #16147, #10186, #18815, #20960 */
    313317*[barrier=kerb][kerb=no],
    314 way[highway=construction][construction=yes],
    315 way[railway=construction][construction=yes],
     318way[highway=construction][construction][construction=~/^(yes|minor|no)$/],
     319way[railway=construction][construction][construction=~/^(yes|minor|no)$/],
     320area[building=construction][construction][construction=~/^(yes|minor|no)$/],
     321area[landuse=construction][construction][construction=~/^(yes|minor|no)$/],
    316322*[man_made=bridge][bridge=yes],
    317323*[man_made=tunnel][tunnel=yes],
     
    438444  assertNoMatch: "node place=foo  addr:postcode=12345";
    439445}
    440 *[!highway][postal_code]["addr:postcode"][postal_code=*"addr:postcode"] {
    441   throwWarning: tr("{0} together with {1}", "{1.key}", "{2.key}");
    442   group: tr("suspicious tag combination");
    443 }
    444 *[!highway][postal_code]["addr:postcode"][postal_code!=*"addr:postcode"] {
    445   throwWarning: tr("{0} together with {1} and conflicting values", "{1.key}", "{2.key}");
    446   group: tr("suspicious tag combination");
    447 }
    448 way[highway][postal_code]["addr:postcode"][postal_code=*"addr:postcode"] {
    449   throwWarning: tr("{0} together with {1}", "{1.key}", "{2.key}");
     446*[postal_code]["addr:postcode"][!highway][postal_code=*"addr:postcode"] {
     447  throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
     448  group: tr("suspicious tag combination");
     449}
     450*[postal_code]["addr:postcode"][!highway][postal_code!=*"addr:postcode"] {
     451  throwWarning: tr("{0} together with {1} and conflicting values", "{0.key}", "{1.key}");
     452  group: tr("suspicious tag combination");
     453}
     454way[postal_code]["addr:postcode"][highway][postal_code=*"addr:postcode"] {
     455  throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
    450456  group: tr("suspicious tag combination");
    451457  fixRemove: "addr:postcode";
    452458}
    453 way[highway][postal_code]["addr:postcode"][postal_code!=*"addr:postcode"] {
    454   throwWarning: tr("{0} together with {1} and conflicting values", "{1.key}", "{2.key}");
    455   group: tr("suspicious tag combination");
    456 }
    457 way[highway][highway!=services][highway!=rest_area][!postal_code]["addr:postcode"] {
    458   throwWarning: tr("{0} together with {1}", "{0.key}", "{4.key}");
     459way[postal_code]["addr:postcode"][highway][postal_code!=*"addr:postcode"] {
     460  throwWarning: tr("{0} together with {1} and conflicting values", "{0.key}", "{1.key}");
     461  group: tr("suspicious tag combination");
     462}
     463way[highway]["addr:postcode"][highway!=services][highway!=rest_area][!postal_code] {
     464  throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
    459465  suggestAlternative: "postal_code";
    460466  group: tr("suspicious tag combination");
     
    489495}
    490496
    491 *[amenity][amenity =~ /^(restaurant|cafe|fast_food|pub|place_of_worship|school|university|hospital|library|theatre|courthouse|bank|cinema|pharmacy|fuel)$/][!name][noname!=yes] {
    492   throwOther: tr("{0} without {1}", "{0.tag}", "{2.key}");
     497*[amenity][!name][amenity =~ /^(restaurant|cafe|fast_food|pub|place_of_worship|school|university|hospital|library|theatre|courthouse|bank|cinema|pharmacy|fuel)$/][noname!=yes] {
     498  throwOther: tr("{0} without {1}", "{0.tag}", "{1.key}");
    493499  group: tr("missing tag");
    494500  assertMatch: "node amenity=restaurant";
     
    616622
    617623/* #11837 */
    618 way[layer][layer<0][bridge][bridge!=no][location!=underground][indoor!=yes][!tunnel],
    619 way[layer][layer>0][tunnel][tunnel!=no][location!=overground][indoor!=yes][!bridge] {
    620   throwWarning: tr("{0} together with {1}", "{2.tag}", "{0.tag}");
     624way[bridge][layer][layer<0][bridge!=no][location!=underground][indoor!=yes][!tunnel],
     625way[tunnel][layer][layer>0][tunnel!=no][location!=overground][indoor!=yes][!bridge] {
     626  throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
    621627  group: tr("suspicious tag combination");
    622628}
     
    658664}
    659665
    660 /* {1.key} without {2.tag} see #13138, #14468 */
    661 way!:closed[water][natural!~/water|bay|strait/][water!=intermittent][amenity!=lavoir], /* water=intermittent is deprecated and has an own warning */
    662 area:closed[water][natural!~/water|bay|strait/][water!=intermittent][amenity!=lavoir] {
    663   throwWarning: tr("{0} without {1}", "{1.key}", "{2.tag}");
     666/* {0.key} without {1.tag} see #13138, #14468 */
     667way[water][natural!~/water|bay|strait/][water!=intermittent][amenity!=lavoir]!:closed, /* water=intermittent is deprecated and has an own warning */
     668area[water][natural!~/water|bay|strait/][water!=intermittent][amenity!=lavoir]:closed {
     669  throwWarning: tr("{0} without {1}", "{0.key}", "{1.tag}");
    664670  group: tr("missing tag");
    665671}
     
    710716
    711717/* #10932, #19609 */
    712 way[highway][!lanes][/^.*:lanes$/][!source:lanes],
    713 way[highway][!lanes][/^.*:lanes:(forward|backward|both_ways)$/],
    714 way[highway][!lanes:both_ways][/^.*:lanes:both_ways$/] {
    715   throwWarning: tr("{0} without {1}", "{2.key}", "{1.key}");
     718way[/^.*:lanes$/][highway][!lanes][!source:lanes],
     719way[/^.*:lanes:(forward|backward|both_ways)$/][!lanes][highway],
     720way[/^.*:lanes:both_ways$/][!lanes:both_ways][highway] {
     721  throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}");
    716722  group: tr("missing tag");
    717723  assertMatch: "way highway=primary turn:lanes=left|right";
     
    719725  assertNoMatch: "way highway=primary turn:lanes=left|right lanes=2";
    720726}
    721 way[highway][!lanes:forward][/^.*:lanes:forward$/][!lanes:backward][mod(tag(lanes),2)=0],
    722 way[highway][!lanes:backward][/^.*:lanes:backward$/][!lanes:forward][mod(tag(lanes),2)=0] {
    723   throwOther: tr("{0} without {1}", "{2.key}", "{1.key}");
     727way[/^.*:lanes:forward$/][!lanes:forward][!lanes:backward][highway][mod(tag(lanes),2)=0],
     728way[/^.*:lanes:backward$/][!lanes:backward][!lanes:forward][highway][mod(tag(lanes),2)=0] {
     729  throwOther: tr("{0} without {1}", "{0.key}", "{1.key}");
    724730  group: tr("missing tag");
    725731  assertMatch: "way highway=primary turn:lanes:forward=left|right lanes=2";
     
    840846}
    841847
    842 /* #18203 */
    843 way[construction][construction!=yes][construction!=minor][highway][highway!=construction] {
    844   throwWarning: tr("{0} together with {1}", "{3.tag}", "{0.tag}");
     848/* #18203, #20960 */
     849way[highway][construction][construction!~/^(yes|minor|no)$/][highway!=construction],
     850way[railway][construction][construction!~/^(yes|minor|no)$/][railway!=construction],
     851area[building][construction][construction!~/^(yes|minor|no)$/][building!=construction],
     852area[landuse][construction][construction!~/^(yes|minor|no)$/][landuse!=construction] {
     853  throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
    845854  group: tr("suspicious tag combination");
    846855}
     
    932941  assertNoMatch: "way highway=primary placement=middle_of:1 placement:backward=transition placement:forward=transition";
    933942}
    934 way[highway][placement][/^placement:.*$/]!.PlacementTransitionWarning,
    935 way[highway]["placement:forward"]["placement:backward"]!.PlacementTransitionWarning,
    936 way[highway]["placement:forward"]["placement:both_ways"]!.PlacementTransitionWarning,
    937 way[highway]["placement:backward"]["placement:both_ways"]!.PlacementTransitionWarning {
    938   throwError: tr("{0} together with {1}", "{1.key}", "{2.key}");
     943way[placement][/^placement:.*$/][highway]!.PlacementTransitionWarning,
     944way["placement:forward"]["placement:backward"][highway]!.PlacementTransitionWarning,
     945way["placement:forward"]["placement:both_ways"][highway]!.PlacementTransitionWarning,
     946way["placement:backward"]["placement:both_ways"][highway]!.PlacementTransitionWarning {
     947  throwError: tr("{0} together with {1}", "{0.key}", "{1.key}");
    939948  group: tr("suspicious tag combination");
    940949  assertMatch: "way highway=primary placement=left_of:2 placement:forward=right_of:1";
Note: See TracChangeset for help on using the changeset viewer.