Skip to content

object_usage_linter should warn about missing packages #2872

Open
@AshesITR

Description

@AshesITR

When getting Namespace exports for library calls fails, this is currently silent. This can cause confusing lints for scripts, e.g.

library(tibble) # and lintr is run where tibble is not installed

f <- function() {
  tibble(x = 42L)
}

In practice, this can easily occur when working with renv and pre-commit because the latter pulls packages from the system library by default instead of from a local renv

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions