Changeset 18105 in josm for trunk


Ignore:
Timestamp:
2021-08-01T21:08:12+02:00 (3 years ago)
Author:
Don-vip
Message:

fix #19419 - Warn about multiple access values (patch by skyper)

File:
1 edited

Legend:

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

    r17286 r18105  
    88*[surface =~ /.+;(.+)?/],
    99*[water =~ /.+;(.+)?/] {
    10     throwWarning: tr("{0} with multiple values", "{0.key}");
     10  throwWarning: tr("{0} with multiple values", "{0.key}");
     11}
     12
     13/* #19419 */
     14node[/^(amenity|barrier|building(:part)?|entrance|(high|rail|water)way|leisure)$/][access *=";"],
     15way[/^(amenity|building(:part)?|(high|rail|water)way|water|leisure)$/][access *=";"],
     16relation[type =~ /^(boundary|multipolygon)$/][access *=";"],
     17*[/^(amenity|building(:part)?|entrance|highway|leisure)$/]["4wd_only" *=";"],
     18*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][agricultural *=";"],
     19*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][bdouble *=";"],
     20*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][bicycle *=";"],
     21*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][bus *=";"],
     22*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][carriage *=";"],
     23*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][disabled *=";"],
     24*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][dog *=";"],
     25*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][emergency *=";"],
     26*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][foot *=";"],
     27*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][golf_cart *=";"],
     28*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][goods *=";"],
     29*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][hazmat *=";"],
     30*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][hgv *=";"],
     31*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][horse *=";"],
     32*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][hov *=";"],
     33*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][mofa *=";"],
     34*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][moped *=";"],
     35*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][motor_vehicle *=";"],
     36*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][motorcar *=";"],
     37*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][motorcycle *=";"],
     38*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][psv *=";"],
     39*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][snowmobile *=";"],
     40*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][ski *=";"],
     41*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][taxi *=";"],
     42*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][tourist_bus *=";"],
     43*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][vehicle *=";"],
     44*[/^(amenity|building(:part)?|entrance|highway|leisure)$/][wheelchair *=";"],
     45*[railway][train *=";"],
     46*[railway][tram *=";"],
     47*[railway][subway *=";"],
     48*[/^(leisure|water(way)?)$/][boat *=";"],
     49*[/^(leisure|water(way)?)$/][canoe *=";"],
     50*[/^(leisure|water(way)?)$/][cargo *=";"],
     51*[/^(leisure|water(way)?)$/][motorboat *=";"],
     52*[/^(leisure|water(way)?)$/][passenger *=";"],
     53*[/^(leisure|water(way)?)$/][ship *=";"],
     54*[/^(leisure|water(way)?)$/][swimming *=";"] {
     55  throwWarning: tr("{0} with multiple values", "{1.key}");
     56  group: tr("Multiple values in access tag");
     57  suggestAlternative: tr("only one value and additional {0}", "{1.key}:conditional");
     58  assertMatch:   "node barrier=block access=agricultural;forestry";
     59  assertNoMatch: "node barrier=block access=agricultural";
     60  assertMatch:   "way highway=trunk access=agricultural;forestry";
     61  assertNoMatch: "way highway=trunk access=agricultural";
     62  assertMatch:   "relation type=multipolygon water=lake access=boat;canoe";
     63  assertNoMatch: "relation type=multipolygon water=lake access=boat";
    1164}
    1265
     
    3689*[sport               =~ /^(;.*|.*;;.*|.*;)$/],
    3790*[cuisine             =~ /^(;.*|.*;;.*|.*;)$/] {
    38         throwWarning: tr("empty value in semicolon-separated ''{0}''", "{0.key}");
    39         assertMatch: "node ref=;A1";
    40         assertMatch: "node ref=A1;";
    41         assertMatch: "node ref=;";
    42         assertMatch: "node ref=A1;;A2";
    43         assertNoMatch: "node ref=A1";
    44         assertNoMatch: "node ref=A1;A2";
     91  throwWarning: tr("empty value in semicolon-separated ''{0}''", "{0.key}");
     92  assertMatch: "node ref=;A1";
     93  assertMatch: "node ref=A1;";
     94  assertMatch: "node ref=;";
     95  assertMatch: "node ref=A1;;A2";
     96  assertNoMatch: "node ref=A1";
     97  assertNoMatch: "node ref=A1;A2";
    4598}
Note: See TracChangeset for help on using the changeset viewer.