Modify

Opened 5 weeks ago

Closed 4 weeks ago

Last modified 4 weeks 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 weeks 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 weeks 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 4 weeks ago.
Update patch to latest JOSM version

Download all attachments as: .zip

Change History (11)

Changed 5 weeks ago by taylor.smock

Attachment: 18057.patch added

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

Changed 5 weeks ago by taylor.smock

Attachment: 18057.2.patch added

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

comment:1 Changed 5 weeks ago by taylor.smock

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 Changed 5 weeks ago by taylor.smock

Component: CoreCore mappaint

comment:3 Changed 5 weeks ago by Don-vip

Milestone: 19.08

comment:4 Changed 4 weeks ago by Don-vip

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

Changed 4 weeks ago by taylor.smock

Attachment: 18057.3.patch added

Update patch to latest JOSM version

comment:5 in reply to:  4 Changed 4 weeks ago by taylor.smock

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 Changed 4 weeks ago by Don-vip

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 Changed 4 weeks ago by Don-vip

Thanks! this one applied perfectly.

comment:8 Changed 4 weeks ago by Don-vip

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.