{"action":"created","issue":{"url":"https://api.github.com/repos/rstudio/rstudio/issues/327","labels_url":"https://api.github.com/repos/rstudio/rstudio/issues/327/labels{/name}","comments_url":"https://api.github.com/repos/rstudio/rstudio/issues/327/comments","events_url":"https://api.github.com/repos/rstudio/rstudio/issues/327/events","html_url":"https://github.com/rstudio/rstudio/pull/327","id":59128492,"number":327,"title":"preview/check for stan files","user":{"login":"jjallaire","id":104391,"avatar_url":"https://avatars.githubusercontent.com/u/104391?v=3","gravatar_id":"","url":"https://api.github.com/users/jjallaire","html_url":"https://github.com/jjallaire","followers_url":"https://api.github.com/users/jjallaire/followers","following_url":"https://api.github.com/users/jjallaire/following{/other_user}","gists_url":"https://api.github.com/users/jjallaire/gists{/gist_id}","starred_url":"https://api.github.com/users/jjallaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjallaire/subscriptions","organizations_url":"https://api.github.com/users/jjallaire/orgs","repos_url":"https://api.github.com/users/jjallaire/repos","events_url":"https://api.github.com/users/jjallaire/events{/privacy}","received_events_url":"https://api.github.com/users/jjallaire/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-26T19:29:39Z","updated_at":"2015-02-26T19:47:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rstudio/rstudio/pulls/327","html_url":"https://github.com/rstudio/rstudio/pull/327","diff_url":"https://github.com/rstudio/rstudio/pull/327.diff","patch_url":"https://github.com/rstudio/rstudio/pull/327.patch"},"body":"This PR adds a \"Check\" button for Stan files (previously this same code-path was used for previewing graphviz diagrams). There is also a \"Check on Save\" option which will run the check every time the file is saved. Currently this executes the following:\r\n\r\n```r\r\nrstan::stanc('filename.stan')\r\n```\r\n\r\nHere's a demonstration:\r\n\r\n![stancheck](https://cloud.githubusercontent.com/assets/104391/6399860/269cfa08-bdc3-11e4-8845-18acad49be01.gif)\r\n\r\nWould be interested in feedback on:\r\n\r\n1. Is `rstan::stanc` the best function to call?\r\n\r\n2. Is \"Check\" the best name to use in the UI.\r\n\r\n@jrnold @maverickg @syclik @bgoodri @bob-carpenter @rtrangucci\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rstudio/rstudio/issues/comments/76254571","html_url":"https://github.com/rstudio/rstudio/pull/327#issuecomment-76254571","issue_url":"https://api.github.com/repos/rstudio/rstudio/issues/327","id":76254571,"user":{"login":"bgoodri","id":3386282,"avatar_url":"https://avatars.githubusercontent.com/u/3386282?v=3","gravatar_id":"","url":"https://api.github.com/users/bgoodri","html_url":"https://github.com/bgoodri","followers_url":"https://api.github.com/users/bgoodri/followers","following_url":"https://api.github.com/users/bgoodri/following{/other_user}","gists_url":"https://api.github.com/users/bgoodri/gists{/gist_id}","starred_url":"https://api.github.com/users/bgoodri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgoodri/subscriptions","organizations_url":"https://api.github.com/users/bgoodri/orgs","repos_url":"https://api.github.com/users/bgoodri/repos","events_url":"https://api.github.com/users/bgoodri/events{/privacy}","received_events_url":"https://api.github.com/users/bgoodri/received_events","type":"User","site_admin":false},"created_at":"2015-02-26T19:47:20Z","updated_at":"2015-02-26T19:47:20Z","body":"We can look into the source marker API. At the moment, it should work well\nenough already. If someone wrote mistaken Stan code in that way, the parser\nwould error out and the approximate line number of the mistake would be\nprinted in the Console along with whatever hints the parser has to say.\n\nOn Thu, Feb 26, 2015 at 2:41 PM, JJ Allaire <notifications@github.com>\nwrote:\n\n> Another possibility to consider would be a new function dedicated to\n> \"checking\" that could take advantage of the new RStudio source marker api\n> to show navigable markers for any errors encountered. Here's how this works\n> with the lintr package:\n>\n> [image: rstudiomarkers]\n> <https://cloud.githubusercontent.com/assets/104391/6400188/421060a2-bdc5-11e4-9e77-f2bd6ee395ae.gif>\n>\n> You could create a function that prints nothing if the source code checks\n> out, prints errors to the console when not in RStudio, and shows source\n> markers when within a sufficiently new version of RStudio. Here's the PR\n> where we added the source marker API calls to lintr:\n>\n> https://github.com/jimhester/lintr/pull/37/files\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/rstudio/rstudio/pull/327#issuecomment-76252962>.\n>\n"}}