-
Notifications
You must be signed in to change notification settings - Fork 193
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Description
If I have a file that generates knitr
templates, e.g.
writeLines('
CreateTemplate <- function(x) {
return(sprintf("
```{r code}
foo <- function(x) x+%d
foo(5)
```", x))
}', tmp <- tempfile())
parse(tmp)
works just fine, however, lintr
assumes this is an Rmd based on matching some chunk regex:
lintr::lint(tmp)
# /tmp/RtmpN8X7Dj/file3d0536f05e5d:4:1: error: Missing chunk end for chunk (maybe starting at line 4).
# ```{r code}
# ^
Should we try parsing the file as R code first, then checking Rmd chunks afterwards?
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior