{{{ #!rule meta { title: "Validating tasks in HOT TM projects"; version: "[[revision]]_[[date]]"; description: "Few rules for checking mistakes mostly made by beginners using ID Editor."; icon: "HOT_TM_logo.svg"; author: "Patrik_B"; link: "http://bit.ly/3zzivTi"; } /* Uploaded part of taskgrid. Added thanks to adiatmad (dinar) */ *[taskId][taskStatus]{ throwError: tr("Part of project taskgrid"); group: tr("HOT TM Validator Checker"); } /* Bridge without layer tag */ *[bridge][!layer]{ throwWarning: tr("_Fix - _Bridge is missing layer tag"); fixAdd: "layer=1"; group: tr("HOT TM Validator Checker"); } /* Tunnel without layer tag. Added thanks to Filip009 */ *[tunnel][!layer]{ throwWarning: tr("_Fix - _Tunnel is missing layer tag"); fixAdd: "layer=-1"; group: tr("HOT TM Validator Checker"); } /* Building with layer tag with exception for building=roof */ *[building][building!=roof][layer]{ throwWarning: tr("_Fix - Building has layer tag"); fixRemove: "layer"; group: tr("HOT TM Validator Checker"); } /* Highway with layer tag with exception for tunnel and bridge. Added thanks to martien-176 */ *[highway][!bridge][!tunnel][layer]{ throwWarning: tr("_Fix - Highway has layer tag"); fixRemove: "layer"; group: tr("HOT TM Validator Checker"); } /* Waterway with layer tag. Added thanks to martien-176 */ *[waterway][!bridge][!tunnel][layer]{ throwWarning: tr("_Fix - Waterway has layer tag"); fixRemove: "layer"; group: tr("HOT TM Validator Checker"); } /* Building with different tag then yes */ way[building][building!=yes]{ throwWarning: tr("Building has different tag then yes"); group: tr("HOT TM Validator Checker"); } /* Node with building tag */ node[building]{ throwWarning: tr("Node has a building tag"); group: tr("HOT TM Validator Checker"); } /* Too short unclassified highway (highway probably having wrong tag). Added thanks to adiatmad (dinar) */ way[highway=unclassified][waylength() < 50][!bridge][!tunnel] { throwWarning: tr("Unclassified highway shorter than 50 meters."); group: tr("HOT TM Validator Checker"); } }}}