Changeset 6549 in josm


Ignore:
Timestamp:
2013-12-27T21:16:58+01:00 (6 years ago)
Author:
simon04
Message:

fix #9379 - Add validator warning: "foot used with highway=motorway|trunk|primary|secondary|tertiary, use sidewalk or separate footway instead"

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/validator/highway.mapcss

    r6516 r6549  
    5858}
    5959
     60way[foot][highway =~ /motorway|trunk|primary|secondary|tertiary/] {
     61  throwWarning: tr("{0} used with {1}", "{0.key}", "{1.tag}");
     62  suggestAlternative: "sidewalk";
     63  suggestAlternative: "separate footway";
     64  assertMatch: "way highway=primary foot=yes";
     65  assertNoMatch: "way highway=primary";
     66}
     67
    6068way[highway=road] {
    6169  throwWarning: tr("temporary highway type");
     
    107115  assertNoMatch: "way name=Foobarstraße";
    108116}
    109 
    110 /*
    111 TODO: * : W : / *name * /i == * && name != * # misspelled key name
    112 */
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java

    r6548 r6549  
    6262        protected final List<PrimitiveToTag> change = new ArrayList<PrimitiveToTag>();
    6363        protected final Map<String, String> keyChange = new LinkedHashMap<String, String>();
    64         protected final List<Tag> alternatives = new ArrayList<Tag>();
     64        protected final List<String> alternatives = new ArrayList<String>();
    6565        protected final Map<String, Severity> errors = new HashMap<String, Severity>();
    6666        protected final Map<String, Boolean> assertions = new HashMap<String, Boolean>();
     
    128128                        check.keyChange.put(x[0].trim(), x[1].trim());
    129129                    } else if ("suggestAlternative".equals(ai.key) && val != null) {
    130                         check.alternatives.add(val.contains("=") ? Tag.ofString(val) : new Tag(val));
     130                        check.alternatives.add(val);
    131131                    } else if ("assertMatch".equals(ai.key) && val != null) {
    132132                        check.assertions.put(val, true);
Note: See TracChangeset for help on using the changeset viewer.