Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#18057 closed enhancement (fixed)

[PATCH] There should be a method to get keys by regex for comparison functions

Reported by: taylor.smock Owned by: team
Priority: normal Milestone: 19.08
Component: Core mappaint Version:
Keywords: Cc:

Description

Example usage:

*[count(tag_regex("ref") > 1] {
  throwError: tr("There is more than one ref");
}

Attachments (3)

18057.patch (5.3 KB ) - added by taylor.smock 5 years ago.
Add tag_regex method and test, reduce duplicated code for parsing flags (adds parse_regex_flags function, currently private)
18057.2.patch (6.3 KB ) - added by taylor.smock 5 years ago.
Move some test logic to a separate (private) function in order to test flags
18057.3.patch (6.4 KB ) - added by taylor.smock 5 years ago.
Update patch to latest JOSM version

Download all attachments as: .zip

Change History (11)

by taylor.smock, 5 years ago

Attachment: 18057.patch added

Add tag_regex method and test, reduce duplicated code for parsing flags (adds parse_regex_flags function, currently private)

by taylor.smock, 5 years ago

Attachment: 18057.2.patch added

Move some test logic to a separate (private) function in order to test flags

comment:1 by taylor.smock, 5 years ago

Summary: [WIP PATCH] There should be a method to get keys by regex for comparison functions[PATCH] There should be a method to get keys by regex for comparison functions

comment:2 by taylor.smock, 5 years ago

Component: CoreCore mappaint

comment:3 by Don-vip, 5 years ago

Milestone: 19.08

comment:4 by Don-vip, 5 years ago

your patch doesn't apply, are you up to date?

by taylor.smock, 5 years ago

Attachment: 18057.3.patch added

Update patch to latest JOSM version

in reply to:  4 comment:5 by taylor.smock, 5 years ago

Replying to Don-vip:

your patch doesn't apply, are you up to date?

It applied cleanly on a separate JOSM source instance for me (I used patch -p0 < 18057.2.patch). I've updated the patch just in case.

The only other thing that _might_ have made a difference is that there was a bit more in the "original" diff -- I had a separate function for uniq_list, which I was going to file a bug and patch for after this was closed.

comment:6 by Don-vip, 5 years ago

Resolution: fixed
Status: newclosed

In 15315/josm:

fix #18057 - add tag_regex mapcss method to get keys by regex for comparison functions (patch by taylor.smock)

comment:7 by Don-vip, 5 years ago

Thanks! this one applied perfectly.

comment:8 by Don-vip, 5 years ago

In 15317/josm:

see #18057 - checkstyle/pmd

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.