Modify

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#10206 closed enhancement (fixed)

asserts for validator rules are failing silently

Reported by: mkoniecz Owned by: team
Priority: normal Milestone: 14.08
Component: Core validator Version:
Keywords: Cc:

Description

I added validator test to my rules (test itself works)

*[bicycle=designated][highway=footway]{
  throwWarning: tr("bicycle=designated on highway=footway [my rule]");
  fixAdd: "foot=designated";
  fixRemove: "highway";
  fixAdd: "highway=path";
  assertMatch: "way bicycle=designated highway=footway";
  assertNoMatch: "way bicycle=designated highway=footway";
}

I would expect that starting JOSM from command line ( java -jar -Xmx812M josm-latest.jar ) would log failing assert in console. Nothing appears, also on running validator check. Only

INFO: Adding C:\Users\Mateusz\Desktop\hibernacja\OSM\moje.validator.mapcss to tag checker

appeared in log.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2014-06-23 01:38:56
Last Changed Author: bastiK
Revision: 7262
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2014-06-22 22:22:11 +0200 (Sun, 22 Jun 2014)
Last Changed Rev: 7262

Identification: JOSM/1.5 (7262 en) Windows 7 32-Bit
Memory Usage: 141 MB / 784 MB (54 MB allocated, but free)
Java version: 1.7.0_55, Oracle Corporation, Java HotSpot(TM) Client VM
VM arguments: [-Xmx812M]
Dataset consistency test: No problems found

Plugin: OpeningHoursEditor (30416)
Plugin: RoadSigns (30495)
Plugin: buildings_tools (30485)
Plugin: continuosDownload (28565)
Plugin: measurement (30416)
Plugin: notes (v0.9.2)
Plugin: turnrestrictions (30454)
Plugin: wikipedia (30449)

Attachments (0)

Change History (8)

comment:1 Changed 4 years ago by simon04

Those assertions are currently tested in the context of unit tests (and continuous integration running on http://donvip.fr/jenkins/job/JOSM/), but not upon initialization.

To avoid unnecessary slow-down of the start-up process, those assertions shouldn't be evaluated on every start-up on every machine – I'd say …

comment:2 Changed 4 years ago by Don-vip

We could check them for local validator files only :)

comment:3 Changed 4 years ago by mkoniecz

Or make it possible to enable it via some option? I plan on suggesting some new validator rules, complete with passing tests.

comment:4 Changed 3 years ago by Don-vip

Type: defectenhancement

comment:5 Changed 3 years ago by Don-vip

Milestone: 14.08

comment:6 Changed 3 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 7356/josm:

fix #10206 - Check MapCSS validator assertions for local rules if new advanced option validator.check_assert_local_rules is enabled in preferences

comment:7 Changed 3 years ago by Don-vip

In 7357/josm:

see #10206 - update Groovy tests

comment:8 Changed 3 years ago by mkoniecz

Thanks!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.