-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to check parameters exist #15
Comments
I added a fix for this in branch "checkvars". Could you check if it works correcly? If so, I will merge it into the master branch. |
Will check ASAP |
Thanks for the quick fix, though at present it seems whisker.render fails to spot a missing value in a list, for example:
produces:
i.e. missing the mis-spelling in line One other minor point - at present the option checkvars is not in help(whisker.render) |
Thanks for the quick testing and your example. I will look into it later this week (bit busy coming days). |
Is this something that is likely to be fixed in the coming weeks? months? years? |
I'm planning to do a whisker update in two weeks and take this issue into account. Sorry for the delay... |
It would be great to see this incorporated -- it helps a lot in checking that template outputs are valid and its a bit of a pain to not be able to work from the canonical version of whisker. Glad to hear there's a new version planned! |
Edwin, Any word on that whisker update? Do you accept pull requests? Do you need help pushing this out to CRAN? |
I'm greatly enjoying whisker but this feature is sorely lacking. Any news on this? |
I think it would be great to have the ability to turn on an option which checked to see if parameters existed, and printed a warning / died if missing, e.g. something like
produces a warning, e.g.
Due to the possibility of nested tags, this is very hard to check externally, so something like this is hard to verify without parsing the structure of the mustache file and comparing to the structure of the R environment:
This is an issue as minor typos can lead to missing variables and hard to detect errors in rendered templates.
See also discussion here: http://stackoverflow.com/questions/16595621/error-safe-templating-with-brew-whisker
The text was updated successfully, but these errors were encountered: