Remove mode checking code from missing_tag, as these validate anytime

This was causing it to not immediately flag "area with no tags" as an error.
(until the user edited the area some other way)
This commit is contained in:
Bryan Housel
2019-04-12 12:49:47 -04:00
parent 0ec9cd91dc
commit da1fe8343a
3 changed files with 1 additions and 14 deletions
+1 -3
View File
@@ -5,14 +5,12 @@ import { validationIssue, validationIssueFix } from '../core/validator';
export function validationIncompatibleSource() {
var type = 'incompatible_source';
var invalidSources = [{id:'google', regex:'google'}];
var validation = function(entity, context) {
var validation = function checkIncompatibleSource(entity, context) {
var issues = [];
if (entity.tags && entity.tags.source) {
invalidSources.forEach(function(invalidSource) {
var pattern = new RegExp(invalidSource.regex, 'i');
-3
View File
@@ -4,12 +4,10 @@ import { services } from '../services';
export function validationMaprules() {
var type = 'maprules';
var validation = function checkMaprules(entity, context) {
if (!services.maprules) return [];
var graph = context.graph();
var rules = services.maprules.validationRules();
var issues = [];
@@ -24,6 +22,5 @@ export function validationMaprules() {
validation.type = type;
return validation;
}
-8
View File
@@ -34,14 +34,6 @@ export function validationMissingTag() {
return [];
}
var mode = context.mode();
if (entity.type === 'way' && mode &&
(mode.id === 'draw-area' || (mode.id === 'draw-line' && !mode.isContinuing)) &&
mode.wayID === entity.id) {
// don't flag missing tag issues if drawing a new way
return [];
}
var messageObj = {};
var missingTagType;