$ ./bin/validate-presets.py web/db/handlerpresets.json
ERROR: "ms-word:" handler with "word:http://www.microsoft.com/investor/downloads/events/CreditSuisseReller.docx" value
ERROR: "slack:" handler with "x-man-page://1/man" value
ERROR: "word:" handler with "ms-word:http://www.microsoft.com/investor/downloads/events/CreditSuisseReller.docx" value
ERROR: "map:" handler with "maps://?ll=50.894967,4.341626" value
ERROR: "map:" handler with "maps://?daddr=San+Francisco&dirflg=d&t=h" value
ERROR: "map:" handler with "maps://?saddr=San+Jose&daddr=San+Francisco&dirflg=r" value
ERROR: "map:" handler with "maps://?address=1,Infinite+Loop,Cupertino,California" value
Simple validation for
web/db/handlerpresets.json
file. It prints error if handler's name is not same as beginning of value's string.Catches problems like this in handlerpresets.json:
Exmple command line usage: