Ticket #8687: patch_8687_1.diff

File patch_8687_1.diff, 3.6 KB (added by dommage, 11 years ago)

Regexp patterns for some measurement tags.

  • data/tagchecker.cfg

     
    7070# see #5844, #6760
    7171#way  : W : oneway != BOOLEAN_FALSE && /.*:(backward|forward)/ == *    # oneway combined with *:backward/forward
    7272
    73 *    : W : layer == /\+.*/                                     # layer tag with + sign
    74 
    7573*    : I : name == /.*Strasse.*/i                              # street name contains ss
    7674
    7775relation : E : type != *                                       # relation without type
     
    164162* : E : wikipedia == * && wikipedia != /[a-zA-Z_-]{2,12}:.*/ # no wikipedia-language given, use ''wikipedia''=''language:page title''
    165163# Valid languages are extracted from <http://de.wikipedia.org/w/api.php?action=sitematrix&format=xml>, which may change, so this is a warning only.
    166164* : W : wikipedia == /[a-zA-Z_-]{2,12}:.*/ && wikipedia != /(aa|ab|ace|af|ak|als|am|an|ang|ar|arc|arz|as|ast|av|ay|az|ba|bar|bat-smg|bcl|be|be-x-old|bg|bh|bi|bjn|bm|bn|bo|bpy|br|bs|bug|bxr|ca|cbk-zam|cdo|ce|ceb|ch|cho|chr|chy|ckb|co|cr|crh|cs|csb|cu|cv|cy|cz|da|de|diq|dk|dsb|dv|dz|ee|el|eml|en|eo|epo|es|et|eu|ext|fa|ff|fi|fiu-vro|fj|fo|fr|frp|frr|fur|fy|ga|gag|gan|gd|gl|glk|gn|got|gu|gv|ha|hak|haw|he|hi|hif|ho|hr|hsb|ht|hu|hy|hz|ia|id|ie|ig|ii|ik|ilo|io|is|it|iu|ja|jbo|jp|jv|ka|kaa|kab|kbd|kg|ki|kj|kk|kl|km|kn|ko|koi|kr|krc|ks|ksh|ku|kv|kw|ky|la|lad|lb|lbe|lez|lg|li|lij|lmo|ln|lo|lt|ltg|lv|map-bms|mdf|mg|mh|mhr|mi|minnan|mk|ml|mn|mo|mr|mrj|ms|mt|mus|mwl|my|myv|mzn|na|nah|nan|nap|nb|nds|nds-nl|ne|new|ng|nl|nn|no|nov|nrm|nso|nv|ny|oc|om|or|os|pa|pag|pam|pap|pcd|pdc|pfl|pi|pih|pl|pms|pnb|pnt|ps|pt|qu|rm|rmy|rn|ro|roa-rup|roa-tara|ru|rue|rw|sa|sah|sc|scn|sco|sd|se|sg|sh|si|simple|sk|sl|sm|sn|so|sq|sr|srn|ss|st|stq|su|sv|sw|szl|ta|te|tet|tg|th|ti|tk|tl|tn|to|tpi|tr|ts|tt|tum|tw|ty|udm|ug|uk|ur|uz|ve|vec|vep|vi|vls|vo|wa|war|wo|wuu|xal|xh|xmf|yi|yo|za|zea|zh|zh-cfr|zh-classical|zh-min-nan|zh-yue|zu):.*/  # unkown language prefix in wikipedia tag
     165
     166# measurement values and units warnings (ticket #8687)
     167way : W : layer == * && layer != /^0|^-?[1-5]/  # layer should be between -5 and 5
     168way : W : level == * && level != /^(([0-9]|[1-9][0-9]*)(\.5)?)(;([0-9]|[1-9][0-9]*)(\.5)?)*/  # level should be 0+ with optional .5
     169way : W : height == * && height != /([0-9]+\.?[0-9]*( m)?)|([0-9]+\'[0-9]+\.?[0-9]*\")/  # meters is default; period is separator; if units, put space then unit
     170way : W : maxheight == * && maxheight != /([0-9]+\.?[0-9]*( m)?)|([0-9]+\'[0-9]+\.?[0-9]*\")/  # meters is default; period is separator; if units, put space then unit
     171way : W : width == * && width != /([0-9]+\.?[0-9]*( [a-z]+)?)|([0-9]+\'[0-9]+\.?[0-9]*\")/  # meters is default; period is separator; if units, put space then unit
     172way : W : maxwidth == * && maxwidth != /([0-9]+\.?[0-9]*( m)?)|([0-9]+\'[0-9]+\.?[0-9]*\")/  # meters is default; period is separator; if units, put space then unit
     173way : W : maxspeed == * && maxspeed != /signals|none|unposted|unknown|variable|[1-9][0-9]*( [a-z]+)?|[A-Z][A-Z]:(urban|rural|living_street|motorway)/i  # unusual maxspeed format
     174way : W : voltage == * && voltage == /([a-z])|,|( )/i  # voltage should be in volts with no units/delimiter/spaces
     175# some users are using frequency for other purposes (not electromagnetic) with the values 'perennial' and 'intermittent'; the vast majority are 0, 16.7, 50 and 60
     176way : W : frequency == * && frequency != /^(0|[1-9][0-9]*(\.[0-9]+)?)( (kHz|MHz|GHz|THz))?/  # unusual frequency specification
     177way : W : gauge == * && gauge != /^[1-9][0-9]{2,3}$/  # unusual train track gauge; use mm with no separator
     178