Changeset 14585 in josm for trunk


Ignore:
Timestamp:
2018-12-22T11:35:27+01:00 (6 years ago)
Author:
GerdP
Message:

see #17055 Disable autofix for possibly misspelled tag values

Some keys like shop have a long list of documented values and not all are in the presets. It can happen that a good value is flagged and a fix and an improper fix value is suggested.
This should be reverted once we have a better source for "correct" values. The presets are too incomplete.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java

    r14571 r14585  
    591591                                        marktr("Value ''{0}'' for key ''{1}'' looks like ''{2}''."), prop.getValue(), key, newValue)
    592592                                .primitives(p)
    593                                 .fix(() -> new ChangePropertyCommand(p, key, newValue))
    594593                                .build());
    595594                        withErrors.put(p, "WPV");
     
    781780            int code = testError.getCode();
    782781            return code == INVALID_KEY || code == EMPTY_VALUES || code == INVALID_SPACE ||
    783                    code == INVALID_KEY_SPACE || code == INVALID_HTML || code == MISSPELLED_VALUE ||
     782                   code == INVALID_KEY_SPACE || code == INVALID_HTML ||
    784783                   code == MULTIPLE_SPACES;
    785784        }
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TagCheckerTest.java

    r14579 r14585  
    108108        assertEquals("Value 'forrest' for key 'landuse' looks like 'forest'.", errors.get(0).getDescription());
    109109        assertEquals(Severity.WARNING, errors.get(0).getSeverity());
    110         assertTrue(errors.get(0).isFixable());
     110        assertFalse(errors.get(0).isFixable());
    111111    }
    112112
     
    136136        assertEquals("Value 'residentail' for key 'highway' looks like 'residential'.", errors.get(0).getDescription());
    137137        assertEquals(Severity.WARNING, errors.get(0).getSeverity());
    138         assertTrue(errors.get(0).isFixable());
     138        assertFalse(errors.get(0).isFixable());
    139139    }
    140140
     
    208208        assertEquals("Value 'Residential' for key 'highway' looks like 'residential'.", errors.get(0).getDescription());
    209209        assertEquals(Severity.WARNING, errors.get(0).getSeverity());
    210         assertTrue(errors.get(0).isFixable());
     210        assertFalse(errors.get(0).isFixable());
    211211    }
    212212
Note: See TracChangeset for help on using the changeset viewer.