Changeset 17268 in josm


Ignore:
Timestamp:
2020-10-26T16:14:48+01:00 (5 weeks ago)
Author:
Klumbumbus
Message:

see #19907 - Avoid that the fix button of some numeric tests produces a still wrong value

File:
1 edited

Legend:

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

    r17267 r17268  
    5555}
    5656
    57 *[height][height =~ /^[0-9]+\.?[0-9]*(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] {
     57*[height][height =~ /^[0-9]+(\.[0-9]+)?(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] {
    5858  throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}");
    5959  set height_meter_autofix;
     
    6565  assertNoMatch: "node height=5";
    6666}
    67 *[height][height =~ /^[0-9]+\.?[0-9]*(( )*(foot|Foot|feet|Feet)|ft)$/] {
     67*[height][height =~ /^[0-9]+(\.[0-9]+)?(( )*(foot|Foot|feet|Feet)|ft)$/] {
    6868  throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}");
    6969  set height_foot_autofix;
     
    8888}
    8989
    90 *[maxheight][maxheight =~ /^[1-9][0-9]*\.?[0-9]*(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] {
     90*[maxheight][maxheight =~ /^[1-9][0-9]*(\.[0-9]+)?(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] {
    9191  throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}");
    9292  set maxheight_meter_autofix;
     
    9898  assertNoMatch: "node maxheight=5";
    9999}
    100 *[maxheight][maxheight =~ /^[0-9]+\.?[0-9]*(( )*(foot|Foot|feet|Feet)|ft)$/] {
     100*[maxheight][maxheight =~ /^[0-9]+(\.[0-9]+)?(( )*(foot|Foot|feet|Feet)|ft)$/] {
    101101  throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}");
    102102  set maxheight_foot_autofix;
     
    121121}
    122122
    123 *[maxlength][maxlength =~ /^[1-9][0-9]*\.?[0-9]*(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] {
     123*[maxlength][maxlength =~ /^[1-9][0-9]*(\.[0-9]+)?(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] {
    124124  throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}");
    125125  set maxlength_meter_autofix;
     
    131131  assertNoMatch: "node maxlength=5";
    132132}
    133 *[maxlength][maxlength =~ /^[0-9]+\.?[0-9]*(( )*(foot|Foot|feet|Feet)|ft)$/] {
     133*[maxlength][maxlength =~ /^[0-9]+(\.[0-9]+)?(( )*(foot|Foot|feet|Feet)|ft)$/] {
    134134  throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}");
    135135  set maxlength_foot_autofix;
     
    154154}
    155155
    156 *[width][width =~ /^[0-9]+\.?[0-9]*(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] {
     156*[width][width =~ /^[0-9]+(\.[0-9]+)?(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] {
    157157  throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}");
    158158  set width_meter_autofix;
     
    164164  assertNoMatch: "node width=5";
    165165}
    166 *[width][width =~ /^[0-9]+\.?[0-9]*(( )*(foot|Foot|feet|Feet)|ft)$/] {
     166*[width][width =~ /^[0-9]+(\.[0-9]+)?(( )*(foot|Foot|feet|Feet)|ft)$/] {
    167167  throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}");
    168168  set width_foot_autofix;
     
    186186}
    187187
    188 *[maxwidth][maxwidth=~ /^[0-9]+\.?[0-9]*(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] {
     188*[maxwidth][maxwidth=~ /^[0-9]+(\.[0-9]+)?(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] {
    189189  throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}");
    190190  set maxwidth_meter_autofix;
     
    196196  assertNoMatch: "node maxwidth=5";
    197197}
    198 *[maxwidth][maxwidth =~ /^[0-9]+\.?[0-9]*(( )*(foot|Foot|feet|Feet)|ft)$/] {
     198*[maxwidth][maxwidth =~ /^[0-9]+(\.[0-9]+)?(( )*(foot|Foot|feet|Feet)|ft)$/] {
    199199  throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}");
    200200  set maxwidth_foot_autofix;
     
    306306  assertNoMatch: "node distance=4";
    307307}
    308 *[distance][distance !~ /^(([0-9]+(\.[0-9]+)?( (m|km|mi|nmi))?)|([0-9]+\'[0-9]+\.?[0-9]*\"))$/]!.distance_separator_autofix {
     308*[distance][distance !~ /^(([0-9]+(\.[0-9]+)?( (m|km|mi|nmi))?)|([0-9]+\'([0-9]+(\.[0-9]+)?\")?))$/]!.distance_separator_autofix {
    309309  throwWarning: tr("unusual value of {0}: kilometers is default; point is decimal separator; if units, put space then unit", "{0.key}");
    310310  assertMatch: "way distance=something";
Note: See TracChangeset for help on using the changeset viewer.