Consider the following Rmd (saved to e.g. lintr-test.Rmd):
```{r}
x<-1
```
```{R}
x<-2
```
```{therom, name='test'}
x<-3
```
Linting the file has the following output:
> lintr::lint("lintr-test.Rmd")
/home/renkun/Workspaces/testR/lintr-test.Rmd:2:2: style: Put spaces around all infix operators.
x<-1
~^~~
/home/renkun/Workspaces/testR/lintr-test.Rmd:10:2: style: Put spaces around all infix operators.
x<-3
~^~~
To my understanding, it should lint the first two R chunks and ignores the third one.
However, the current chunk extraction does not seem to work consistently with knitr in that knitr treats r and R as the same. The theorem is brought up at REditorSupport/languageserver#421 where bookdown seems to provide some markdown extensions where additional engines are implemented (as introduced at https://bookdown.org/yihui/bookdown/markdown-extensions-by-bookdown.html).
I think the expected behavior should be linting the R or r chunks and ignores all other chunks.
Consider the following Rmd (saved to e.g.
lintr-test.Rmd):Linting the file has the following output:
To my understanding, it should lint the first two R chunks and ignores the third one.
However, the current chunk extraction does not seem to work consistently with knitr in that knitr treats
randRas the same. Thetheoremis brought up at REditorSupport/languageserver#421 where bookdown seems to provide some markdown extensions where additional engines are implemented (as introduced at https://bookdown.org/yihui/bookdown/markdown-extensions-by-bookdown.html).I think the expected behavior should be linting the
Rorrchunks and ignores all other chunks.