From 5dbd93b23217be39888cbcfac9d0012b5cb209ac Mon Sep 17 00:00:00 2001 From: Chris Hartgerink Date: Tue, 13 Aug 2024 14:11:21 +0200 Subject: [PATCH] Remove `# nolint` for options --- .lintr | 3 ++- R/lost_tags_action.R | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.lintr b/.lintr index c5c32d8..48e86da 100644 --- a/.lintr +++ b/.lintr @@ -9,7 +9,8 @@ linters: all_linters( modify_defaults( default_undesirable_functions, citEntry = "use the more modern bibentry() function", - library = NULL # too many false positive in too many files + library = NULL, # too many false positive in too many files + options = NULL ) ), function_argument_linter = NULL, diff --git a/R/lost_tags_action.R b/R/lost_tags_action.R index b47c1c5..685ffeb 100644 --- a/R/lost_tags_action.R +++ b/R/lost_tags_action.R @@ -43,11 +43,11 @@ #' lost_tags_action <- function(action = c("warning", "error", "none"), quiet = FALSE) { - datatagr_options <- options("datatagr")$datatagr # nolint + datatagr_options <- options("datatagr")$datatagr action <- match.arg(action) datatagr_options$lost_tags_action <- action - options(datatagr = datatagr_options) # nolint + options(datatagr = datatagr_options) if (!quiet) { if (action == "warning") msg <- "Lost tags will now issue a warning." if (action == "error") msg <- "Lost tags will now issue an error." @@ -64,5 +64,5 @@ lost_tags_action <- function(action = c("warning", "error", "none"), #' @rdname lost_tags_action get_lost_tags_action <- function() { - options("datatagr")$datatagr$lost_tags_action # nolint + options("datatagr")$datatagr$lost_tags_action }