| | 219 | /* One of many {0.key} but no {1.key} */ |
| | 220 | |
| | 221 | /* gtfs:source_date */ |
| | 222 | *[/(^gtfs:|:gtfs|^ref:IFOPT)/][!gtfs:source_date] { |
| | 223 | throwWarning: tr("GTFS tag without `{0}*`.", "{1.tag}"); |
| | 224 | group: tr("Public Transport GTFS: missing tag"); |
| | 225 | assertMatch: "node gtfs:route_id=1"; |
| | 226 | assertMatch: "node note:gtfs=A"; |
| | 227 | assertMatch: "node ref:IFOPT=1"; |
| | 228 | assertNoMatch: "node ref:IFOPT=1 gtfs:source_date=2019"; |
| | 229 | } |
| | 355 | /* abbreviatons */ |
| | 356 | |
| | 357 | /* network */ |
| | 358 | *[public_transport ][network][!network:short][network =~ /^[A-Z0-9]+$/], |
| | 359 | relation.PtRouteMaster[network][!network:short][network =~ /^[A-Z0-9]+$/], |
| | 360 | relation.PtRoute[network ][!network:short][network =~ /^[A-Z0-9]+$/] { |
| | 361 | throwWarning: tr(" `{0}` looks like an abbreviation", "{1.tag}"); |
| | 362 | group: tr("Public Transport GTFS: value syntax"); |
| | 363 | suggestAlternative: "`network:short=*` and a longer form for `network=*`"; |
| | 364 | fixChangeKey: "network=>network:short"; |
| | 365 | assertMatch: "relation public_transport=stop_area network=AA0AA"; |
| | 366 | assertNoMatch: "relation public_transport=stop_area network=AA0AA network:short=A"; |
| | 367 | assertNoMatch: "relation public_transport=stop_area network=Anna"; |
| | 368 | } |
| | 369 | |
| | 370 | /* operator */ |
| | 371 | *[public_transport ][operator][!operator:short][operator =~ /^[A-Z0-9]+$/], |
| | 372 | relation.PtRouteMaster[operator][!operator:short][operator =~ /^[A-Z0-9]+$/], |
| | 373 | relation.PtRoute[operator ][!operator:short][operator =~ /^[A-Z0-9]+$/] { |
| | 374 | throwWarning: tr(" `{0}` looks like an abbreviation", "{1.tag}"); |
| | 375 | group: tr("Public Transport GTFS: value syntax"); |
| | 376 | suggestAlternative: "`operator:short=*` and a longer form for `operator=*`"; |
| | 377 | fixChangeKey: "operator=>operator:short"; |
| | 378 | assertMatch: "relation public_transport=stop_area operator=AA0AA"; |
| | 379 | assertNoMatch: "relation public_transport=stop_area operator=AA0AA operator:short=A"; |
| | 380 | assertNoMatch: "relation public_transport=stop_area operator=Anna"; |
| | 381 | } |
| | 382 | |