Ticket #20902: josm_combinations_only_tag.patch

File josm_combinations_only_tag.patch, 1.9 KB (added by skyper, 3 years ago)

patch

  • resources/data/validator/combinations.mapcss

     
    66  set unpaved_surface;
    77}
    88
     9node[eval(number_of_tags()) = 1],
     10way[eval(number_of_tags()) = 1],
     11relation[type][eval(number_of_tags()) = 2] {
     12  set one_tag;
     13}
     14
    915/* {0.key} without {1.key} (warning level) */
    1016way[junction                   ][!highway][junction!=yes][!area:highway],
    1117way[living_street              ][!highway],
     
    337343}
    338344
    339345/* #16214 */
    340 relation[type=multipolygon] >[role="inner"] way[area][eval(number_of_tags()) = 1] {
     346relation[type=multipolygon] >[role="inner"] way[area].one_tag {
    341347  throwWarning: tr("{0} on an inner multipolygon ring without further tags", "{0.tag}");
    342348  fixRemove: "area";
    343349  set area_yes_autofix;
    344350  group: tr("suspicious tag combination");
    345351}
    346352
    347 /* only {0.key}, #11104, #12422, #14950, #19572 */
    348 *[lanes][eval(number_of_tags()) = 1],
    349 *[surface][eval(number_of_tags()) = 1],
    350 *[access][eval(number_of_tags()) = 1],
    351 *[area][eval(number_of_tags()) = 1]!.area_yes_autofix,
    352 *[name][eval(number_of_tags()) = 1],
    353 *[ref][eval(number_of_tags()) = 1],
    354 *[lit][eval(number_of_tags()) = 1] {
     353/* only {0.key}, #11104, #12422, #14950, #19572, #20902 */
     354*[access].one_tag,
     355*[area].one_tag!.area_yes_autofix,
     356*[lanes].one_tag,
     357*[layer].one_tag,
     358way[level].one_tag,
     359relation[level].one_tag,
     360*[lit].one_tag,
     361*[name].one_tag,
     362*[ref].one_tag,
     363*[surface].one_tag {
    355364  throwWarning: tr("incomplete object: only {0}", "{0.key}");
    356365  set only_one_tag;
    357366  group: tr("missing tag");
     
    363372  group: tr("missing tag");
    364373}
    365374/* only {0.tag}, #15269 */
    366 *[tourism=attraction][eval(number_of_tags()) = 1] {
     375*[tourism=attraction].one_tag {
    367376  throwWarning: tr("incomplete object: only {0}", "{0.tag}");
    368377  group: tr("missing tag");
    369378}