From 795899912c9a9701ca9b61eb19bf60fbc5bc1ee5 Mon Sep 17 00:00:00 2001 From: Jakub Nowicki <kuba@appsilon.com> Date: Fri, 8 Mar 2024 14:35:45 +0100 Subject: [PATCH] chore: Minor documentation fixes. --- R/box_linters.R | 9 ++------- man/box_alphabetical_calls_linter.Rd | 5 ----- vignettes/explanation/rhino-style-guide.Rmd | 2 +- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/R/box_linters.R b/R/box_linters.R index 55892487..987884ff 100644 --- a/R/box_linters.R +++ b/R/box_linters.R @@ -42,15 +42,10 @@ #' ) #' #' lintr::lint( -#' text = "box::use(package[one, two, three])", -#' linters = box_alphabetical_calls_linter() -#' ) -#' -#' lintr::lint( #' text = "box::use(package[functionA, functionB])", #' linters = box_alphabetical_calls_linter() #' ) -#' +#' #' lintr::lint( #' text = "box::use(path/to/A, path/to/B)", #' linters = box_alphabetical_calls_linter() @@ -69,7 +64,7 @@ #' @export # nolint end box_alphabetical_calls_linter <- function() { - xpath_base <- "//SYMBOL_PACKAGE[(text() = 'box' and + xpath_base <- "//SYMBOL_PACKAGE[(text() = 'box' and following-sibling::SYMBOL_FUNCTION_CALL[text() = 'use'])] /parent::expr /parent::expr" diff --git a/man/box_alphabetical_calls_linter.Rd b/man/box_alphabetical_calls_linter.Rd index 09d9396f..6010a604 100644 --- a/man/box_alphabetical_calls_linter.Rd +++ b/man/box_alphabetical_calls_linter.Rd @@ -48,11 +48,6 @@ lintr::lint( linters = box_alphabetical_calls_linter() ) -lintr::lint( - text = "box::use(package[one, two, three])", - linters = box_alphabetical_calls_linter() -) - lintr::lint( text = "box::use(package[functionA, functionB])", linters = box_alphabetical_calls_linter() diff --git a/vignettes/explanation/rhino-style-guide.Rmd b/vignettes/explanation/rhino-style-guide.Rmd index f59a425f..393410bc 100644 --- a/vignettes/explanation/rhino-style-guide.Rmd +++ b/vignettes/explanation/rhino-style-guide.Rmd @@ -104,7 +104,7 @@ box::use( # Bad box::use( a_pkg = shiny, - rhino[a_fun = react_component, log] + rhino[a_fun = react_component, log], ) ```