- Timestamp:
- 2020-01-11T17:04:04+01:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/validation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/Test.java
r15640 r15682 23 23 import org.openstreetmap.josm.data.osm.search.SearchCompiler.NotOutsideDataSourceArea; 24 24 import org.openstreetmap.josm.data.osm.visitor.OsmPrimitiveVisitor; 25 import org.openstreetmap.josm.data.preferences.sources.ValidatorPrefHelper; 25 26 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 26 27 import org.openstreetmap.josm.gui.progress.ProgressMonitor; … … 141 142 public void visit(Relation r) { 142 143 check(r); 144 } 145 146 protected final boolean includeOtherSeverityChecks() { 147 return isBeforeUpload ? ValidatorPrefHelper.PREF_OTHER_UPLOAD.get() : ValidatorPrefHelper.PREF_OTHER.get(); 143 148 } 144 149 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
r15640 r15682 1005 1005 indexData = null; 1006 1006 } 1007 1008 private boolean includeOtherSeverityChecks() {1009 return isBeforeUpload ? ValidatorPrefHelper.PREF_OTHER_UPLOAD.get() : ValidatorPrefHelper.PREF_OTHER.get();1010 }1011 1012 1007 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
r15667 r15682 144 144 145 145 private static final int MAX_LEVENSHTEIN_DISTANCE = 2; 146 147 protected boolean includeOtherSeverity; 146 148 147 149 protected boolean checkKeys; … … 694 696 withErrors.put(p, errTypeSpace); 695 697 } 696 if ( !value.equals(Entities.unescape(value)) && !withErrors.contains(p, "HTML")) {698 if (includeOtherSeverity && !value.equals(Entities.unescape(value)) && !withErrors.contains(p, "HTML")) { 697 699 errors.add(TestError.builder(this, Severity.OTHER, INVALID_HTML) 698 700 .message(tr("Property values contain HTML entity"), s, key) … … 781 783 } 782 784 withErrors.put(p, "WPK"); 783 } else {785 } else if (includeOtherSeverity) { 784 786 errors.add(TestError.builder(this, Severity.OTHER, INVALID_KEY) 785 787 .message(tr("Presets do not contain property key"), marktr("Key ''{0}'' not in presets."), key) … … 867 869 .build()); 868 870 withErrors.put(p, "WPV"); 869 } else {871 } else if (includeOtherSeverity) { 870 872 // unknown preset value 871 873 errors.add(TestError.builder(this, Severity.OTHER, INVALID_VALUE) … … 903 905 public void startTest(ProgressMonitor monitor) { 904 906 super.startTest(monitor); 907 includeOtherSeverity = includeOtherSeverityChecks(); 905 908 checkKeys = Config.getPref().getBoolean(PREF_CHECK_KEYS, true); 906 909 if (isBeforeUpload) { … … 918 921 } 919 922 920 checkFixmes = Config.getPref().getBoolean(PREF_CHECK_FIXMES, true);923 checkFixmes = includeOtherSeverity && Config.getPref().getBoolean(PREF_CHECK_FIXMES, true); 921 924 if (isBeforeUpload) { 922 925 checkFixmes = checkFixmes && Config.getPref().getBoolean(PREF_CHECK_FIXMES_BEFORE_UPLOAD, true); 923 926 } 924 927 925 checkPresetsTypes = Config.getPref().getBoolean(PREF_CHECK_PRESETS_TYPES, true);928 checkPresetsTypes = includeOtherSeverity && Config.getPref().getBoolean(PREF_CHECK_PRESETS_TYPES, true); 926 929 if (isBeforeUpload) { 927 930 checkPresetsTypes = checkPresetsTypes && Config.getPref().getBoolean(PREF_CHECK_PRESETS_TYPES_BEFORE_UPLOAD, true);
Note:
See TracChangeset
for help on using the changeset viewer.