move deprecatedTags logic out of osmEntity and into a helper function (#10842)

This commit is contained in:
Kyℓe Hensel
2025-03-08 04:29:25 +11:00
committed by GitHub
parent 16f1187c04
commit 9d16588f19
6 changed files with 183 additions and 132 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ import { services } from '../services';
import { utilHashcode, utilTagDiff } from '../util';
import { utilDisplayLabel } from '../util/utilDisplayLabel';
import { validationIssue, validationIssueFix } from '../core/validation';
import { getDeprecatedTags } from '../osm/deprecated';
/** @import { TagDiff } from '../util/util'. */
@@ -43,7 +44,7 @@ export function validationOutdatedTags() {
// Upgrade deprecated tags..
if (_dataDeprecated) {
const deprecatedTags = entity.deprecatedTags(_dataDeprecated);
const deprecatedTags = getDeprecatedTags(entity.tags, _dataDeprecated);
if (entity.type === 'way' && entity.isClosed() &&
entity.tags.traffic_calming === 'island' && !entity.tags.highway) {
// https://github.com/openstreetmap/id-tagging-schema/issues/1162#issuecomment-2000356902