Skip to content

Commit

Permalink
lintr & other checks
Browse files Browse the repository at this point in the history
ref #9
  • Loading branch information
wibeasley committed Aug 12, 2022
1 parent 18a1c5b commit 811baf2
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 7 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ documentation-for-developers/
playgrounds/
utility/
^\.github$
^\.lintr$
^\.markdownlist\.json$
^\.travis\.yml$
^appveyor\.yml$
Expand Down
5 changes: 5 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
linters: linters_with_defaults(
line_length_linter(120),
commas_linter = NULL,
commented_code_linter = NULL
)
2 changes: 0 additions & 2 deletions CRAN-RELEASE

This file was deleted.

38 changes: 33 additions & 5 deletions documentation-for-developers/refresh.R
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
rm(list=ls(all=TRUE))
rm(list = ls(all = TRUE))
# library(devtools)
deviceType <- ifelse(R.version$os=="linux-gnu", "X11", "windows")
options(device = deviceType) #http://support.rstudio.org/help/discussions/problems/80-error-in-function-only-one-rstudio-graphics-device-is-permitted
# deviceType <- ifelse(R.version$os=="linux-gnu", "X11", "windows")
# options(device = deviceType) #http://support.rstudio.org/help/discussions/problems/80-error-in-function-only-one-rstudio-graphics-device-is-permitted

spelling::spell_check_package()
# spelling::update_wordlist()
lintr::lint_package()
urlchecker::url_check(); urlchecker::url_update()

devtools::document()
devtools::check_man() #Should return NULL
devtools::build_vignettes()

checks_to_exclude <- c(
"covr",
# "cyclocomp"#,
"lintr_line_length_linter"
)
gp <-
goodpractice::all_checks() |>
purrr::discard(~(. %in% checks_to_exclude)) |>
{
\(checks)
goodpractice::gp(checks = checks)
}()
goodpractice::results(gp)
gp

devtools::document()
pkgdown::clean_site()
pkgdown::build_site()
system("R CMD Rd2pdf --no-preview --force --output=./documentation-peek.pdf ." )
# system("R CMD Rd2pdf --no-preview --force --output=./documentation-peek.pdf ." )

devtools::run_examples(); #dev.off() #This overwrites the NAMESPACE file too
# devtools::run_examples(, "table-nih-enrollment.Rd")
Expand All @@ -18,7 +40,13 @@ test_results_checked <- devtools::test(filter = "table-nih-enrollment")
test_results_not_checked <- testthat::test_dir("./tests/manual/")

# devtools::check(force_suggests = FALSE)
devtools::check(cran=TRUE)
devtools::check( # Equivalent of R-hub
manual = TRUE,
remote = TRUE,
incoming = TRUE
)
devtools::check_rhub(email="[email protected]")
# devtools::check_win_devel() #CRAN submission policies encourage the development version
# devtools::check_rhub(email="[email protected]")
# devtools::revdep_check(pkg="codified", recursive=TRUE)
# devtools::release(check=FALSE) #Careful, the last question ultimately uploads it to CRAN, where you can't delete/reverse your decision.

0 comments on commit 811baf2

Please sign in to comment.