Skip to content

Commit e46b850

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 4802ba9 commit e46b850

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

API

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ precommit_docopt(doc, args = commandArgs(trailingOnly = TRUE), ...)
1515
robust_purl(path)
1616
roxygen_assert_additional_dependencies()
1717
roxygenize_with_cache(key, dirs)
18-
snippet_generate(snippet, open = rstudioapi::isAvailable(), root = here::here())
18+
snippet_generate(snippet = "additional-deps-roxygenize", open = rstudioapi::isAvailable(), root = here::here())
1919
uninstall_precommit(scope = "repo", ask = "user", root = here::here())
2020
update_precommit()
2121
use_ci(ci = getOption("precommit.ci", "native"), force = FALSE, open = rstudioapi::isAvailable(), root = here::here())

R/setup.R

+4-4
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,12 @@ upstream_repo_url_is_outdated <- function() {
249249
snippet_generate <- function(snippet = "additional-deps-roxygenize",
250250
open = rstudioapi::isAvailable(),
251251
root = here::here()) {
252-
snippet_generator <- if(snippet == 'additional-deps-roxygenize') {
252+
snippet_generator <- if (snippet == "additional-deps-roxygenize") {
253253
snippet_generate_impl_additional_deps_roxygenize
254-
} else if (snippet == 'additional-deps-lintr') {
254+
} else if (snippet == "additional-deps-lintr") {
255255
snippet_generate_impl_additional_deps_lintr
256256
} else {
257-
rlang::abort(paste0('Snippet "', snippet, '" not supported'))
257+
rlang::abort(paste0('Snippet "', snippet, '" not supported'))
258258
}
259259
rlang::inform(paste(
260260
"Generating snippet using CRAN versions. If you need another source,",
@@ -272,7 +272,7 @@ snippet_generate <- function(snippet = "additional-deps-roxygenize",
272272
))
273273
return()
274274
}
275-
275+
276276
hard_dependencies %>%
277277
snippet_generator() %>%
278278
cat(sep = "")

tests/testthat/test-setup.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ test_that("snippet generation works for lintr", {
4343
out <- capture_output(snippet_generate("additional-deps-lintr")),
4444
NA,
4545
)
46-
46+
4747
expect_match(
4848
out, " - id: lintr\n.* - styler\n$",
4949
)

0 commit comments

Comments
 (0)