Opened 5 months ago
Last modified 5 months ago
#21870 new defect
Opening hours: Possibly false positive "can be prettified" with complex value
Reported by: | skyper | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core validator | Version: | latest |
Keywords: | template_report opening_hour prettify | Cc: |
Description
What steps will reproduce the problem?
- Have strict mode for opening hours validations plus informal warnings enabled
- Have an object with
opening_hours=Mo 00:00-00:14, Mo-Sa 23:06-23:30; Su,PH 22:45-24:00; PH +1 day Mo-Sa 00:00-00:14,23:06-23:30; PH +1 day Su,PH 00:00-00:14,22:45-24:00
- Run validator
What is the expected result?
No informal warning
What happens instead?
Informal warning:
Opening hours syntax - opening_hours value can be prettified
Please provide any additional information below. Attach a screenshot if possible.
I can not find anything to prettify and guess this is a false positive but maybe someone else can tell me what validator does not like.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2022-02-10 22:03:15 +0100 (Thu, 10 Feb 2022) Revision:18379 Build-Date:2022-02-11 02:31:13 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (18379 en) Linux Debian GNU/Linux 11 (bullseye) Java version: 17.0.2+8-Debian-1deb11u1, Debian, OpenJDK 64-Bit Server VM
Attachments (0)
Change History (3)
comment:2 Changed 5 months ago by
It gave me this result, only a single space difference before PH.
-Mo 00:00-00:14, Mo-Sa 23:06-23:30; Su,PH 22:45-24:00; PH +1 day Mo-Sa 00:00-00:14,23:06-23:30; PH +1 day Su,PH 00:00-00:14,22:45-24:00 +Mo 00:00-00:14, Mo-Sa 23:06-23:30; Su,PH 22:45-24:00; PH +1 day Mo-Sa 00:00-00:14,23:06-23:30; PH +1 day Su, PH 00:00-00:14,22:45-24:00
comment:3 Changed 5 months ago by
Thanks. The extra space does not make any sense to me and https://openingh.openstreetmap.de/evaluation_tool/ tells exactly that.
I guess this is related to #20316.
(The OH parser provided by an external component https://github.com/simonpoole/OpeningHoursParser)