Skip to contents

Individual session check function that inspects the names of attached non-package environments. Session checkers can produce errors, warnings, or messages if requested.

Usage

check_attached_environments(
  action = "warn",
  allow_attached_environments = NULL
)

Arguments

action

Behaviour to take if the status is not clean. Possible values are "error", "warn", "message", and "none". The default is action = "warn".

allow_attached_environments

Character vector containing names of environments that are "allowed", and will not trigger an action if attached to the search path.

Value

Invisibly returns an object of class sessioncheck_status.

Details

This checker inspects all environments on the search path. This includes attached packages, anything added using attach(), and the global environment. When allow_attached_environments = NULL, package environents do not trigger an action, nor do "tools:rstudio", "tools:positron", "tools:callr", or "Autoloads". The global environment and the package environment for the base package never trigger actions.

Examples

check_attached_environments(action = "message")