Skip to content

library_call_linter() should exempt header boilerplate in Rmd #2153

@MichaelChirico

Description

@MichaelChirico

Originally posted by @MichaelChirico in #2152 (comment)

It's very common to start an Rmd vignette with an include=FALSE header setting up metadata:

```{r setup, include=FALSE}
knitr::opts_chunk$set(...)
```

```{r first_visible_cell}
library(my.pkg)
```

But library_call_linter() lints this. The right approach is probably to exclude certain calls preceding the first library().

I've also wondered if commandArgs(TRUE) / options parsing must come after the library() calls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    false-positivecode that shouldn't lint, but doesrmd

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions