Skip to content

Commit

Permalink
Only spellcheck when not testthat:::on_cran()
Browse files Browse the repository at this point in the history
  • Loading branch information
schloerke committed Mar 24, 2024
1 parent 5941afa commit 244e643
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions tests/spelling.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
if(requireNamespace('spelling', quietly = TRUE))
spelling::spell_check_test(vignettes = TRUE, error = FALSE,
skip_on_cran = TRUE)
# testthat:::on_cran
is_interactive <- rlang::is_interactive()
not_cran <- isTRUE(as.logical(Sys.getenv("NOT_CRAN", "false")))
on_cran <- !is_interactive && !not_cran

if (!on_cran) {
if (requireNamespace("spelling", quietly = TRUE)) {
spelling::spell_check_test(
vignettes = TRUE, error = FALSE,
skip_on_cran = TRUE
)
}
}

0 comments on commit 244e643

Please sign in to comment.