(cache)
| 213 | if (typeof checkUnsquareWay !== 'function') return; |
| 214 | |
| 215 | const revalidate = (cache) => { |
| 216 | if (!cache.graph) return; |
| 217 | |
| 218 | cache.uncacheIssuesOfType('unsquare_way'); // uncache existing |
| 219 | |
| 220 | // rerun for all buildings |
| 221 | const tree = this.context.systems.editor.tree; |
| 222 | const buildings = tree.intersects(new Extent([-180,-90],[180, 90]), cache.graph) // everywhere |
| 223 | .filter(entity => (entity.type === 'way' && entity.tags.building && entity.tags.building !== 'no')); |
| 224 | |
| 225 | for (const entity of buildings) { |
| 226 | const detected = checkUnsquareWay(entity, cache.graph); |
| 227 | if (!detected.length) continue; |
| 228 | cache.cacheIssues(detected); |
| 229 | } |
| 230 | }; |
| 231 | |
| 232 | revalidate(this._head); |
| 233 | revalidate(this._base); |
nothing calls this directly
no test coverage detected