Changeset 19273 in josm for trunk


Ignore:
Timestamp:
2024-12-30T17:54:07+01:00 (3 months ago)
Author:
stoecker
Message:

fix #24054 - no longer silently ignore identical or mismatching asserts in mapcss tag checker

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/resources/data/validator/combinations.mapcss

    r19257 r19273  
    10741074  throwWarning: tr("{0} together with {1}", "{0.tag}", "{3.tag}");
    10751075  group: tr("suspicious tag combination");
    1076   assertMatch: "way cycleway:right=separate cycleway:right:buffer=yes";
    10771076  assertMatch: "way cycleway:left=shared_lane cycleway:buffer=no";
    10781077  assertMatch: "way cycleway:both=track cycleway:left:buffer=yes";
  • trunk/resources/data/validator/highway.mapcss

    r18552 r19273  
    9292way[highway=cycleway][cycleway=lane] {
    9393  throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
     94  assertMatch: "way highway=cycleway cycleway=lane";
     95  assertMatch: "way highway=footway maxspeed=20";
    9496  assertNoMatch: "way highway=cycleway bicycle=yes";
    9597  assertNoMatch: "way highway=cycleway";
    9698  assertNoMatch: "way highway=footway foot=yes";
    9799  assertNoMatch: "way highway=footway";
    98   assertMatch: "way highway=cycleway cycleway=lane";
    99   assertNoMatch: "way highway=cycleway";
    100100  assertNoMatch: "way highway=residential cycleway=lane";
    101   assertMatch: "way highway=footway maxspeed=20";
    102101  assertNoMatch: "way highway=residential maxspeed=20";
    103   assertNoMatch: "way highway=footway";
    104102}
    105103
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerRule.java

    r18960 r19273  
    151151                    } else if (val != null && "suggestAlternative".equals(ai.key)) {
    152152                        check.alternatives.add(val);
    153                     } else if (val != null && "assertMatch".equals(ai.key)) {
     153                    } else if (val != null && "assertMatch".equals(ai.key) && !assertions.containsKey(val)) {
    154154                        assertions.put(val, Boolean.TRUE);
    155                     } else if (val != null && "assertNoMatch".equals(ai.key)) {
     155                    } else if (val != null && "assertNoMatch".equals(ai.key) && !assertions.containsKey(val)) {
    156156                        assertions.put(val, Boolean.FALSE);
    157157                    } else if (val != null && "group".equals(ai.key)) {
Note: See TracChangeset for help on using the changeset viewer.