Return all check results in a data frame
Arguments
- gp
gpoutput.
Value
Data frame, with columns:
- check
The name of the check.
- passed
Logical, whether the check passed.
See also
Other API:
checks(),
failed_checks()
Examples
path <- system.file("bad1", package = "goodpractice")
# run a subset of all checks available
g <- gp(path, checks = all_checks()[3:16])
#> ── Preparing goodpractice for badpackage ───────────────────────────────────────
#> ℹ Preparing: code_structure
#> ✔ Preparing: code_structure [7ms]
#>
#> ℹ Preparing: namespace
#> ✔ Preparing: namespace [7ms]
#>
#> ℹ Preparing: covr
#> Warning: Prep step for "covr" failed: Failure in
#> `/tmp/Rtmp6DGrid/R_LIBS5f2647b1610/badpackage/badpackage-tests/testthat.Rout.fail`
#> comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under
#> certain conditions. Type 'license()' or 'licence()' for distribution details.
#> R is a collaborative project with many contributors. Type 'contributors()' for
#> more information and 'citation()' on how to cite R or R packages in
#> publications. Type 'demo()' for some demos, 'help()' for on-line help, or
#> 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. >
#> > library(testthat) > test_check("bad1") Loading required package: bad1 Error
#> in idesc_create_package(self, private, package) : Cannot find DESCRIPTION for
#> installed package bad1 Calls: test_check ... <Anonymous> -> initialize ->
#> idesc_create -> idesc_create_package In addition: Warning message: In
#> library(package, lib.loc = lib.loc, character.only = TRUE, logical.return =
#> TRUE, : there is no package called 'bad1' Execution halted
#> ✔ Preparing: covr [1.9s]
#>
#> ℹ Preparing: cyclocomp
#> Warning: cannot open compressed file './DESCRIPTION', probable reason 'No such file or directory'
#> Warning: Prep step for "cyclocomp" failed: Failed to install 'badpackage' from local:
#> cannot open the connection
#> ✔ Preparing: cyclocomp [4.6s]
#>
#> ℹ Preparing: description
#> ✔ Preparing: description [10ms]
#>
results(g)
#> check passed
#> 1 on_exit_has_add TRUE
#> 2 complexity_function_length TRUE
#> 3 complexity_unused_internal FALSE
#> 4 duplicate_function_bodies TRUE
#> 5 covr NA
#> 6 cyclocomp NA
#> 7 no_description_depends FALSE
#> 8 no_description_date FALSE
#> 9 description_url FALSE
#> 10 description_not_start_with_package TRUE
#> 11 description_urls_in_angle_brackets TRUE
#> 12 description_doi_format TRUE
#> 13 description_urls_not_http TRUE
#> 14 no_description_duplicate_deps TRUE
