To see the results, just print it to the screen.

  path = ".",
  checks = all_checks(),
  extra_preps = NULL,
  extra_checks = NULL,
  quiet = TRUE



Path to a package root.


Character vector, the checks to run. Defaults to all checks. Use all_checks to list all checks.


Custom preparation functions. See make_prep on creating preparation functions.


Custom checks. See make_check on creating checks.


Whether to suppress output from the preparation functions. Note that not all preparation functions produce output, even if this option is set to FALSE.


A goodpractice object that you can query with a simple API. See results to start.


path <- system.file("bad1", package = "goodpractice")
# run a subset of all checks available
g <- gp(path, checks = all_checks()[3:16])
#> Preparing: description
#> Preparing: lintr
#> Preparing: namespace
#> ── GP badpackage ───────────────────────────────────────────────────────────────
#> It is good practice to
#>    not use "Depends" in DESCRIPTION, as it can cause name
#>     clashes, and poor interaction with other packages. Use "Imports"
#>     instead.
#>    omit "Date" in DESCRIPTION. It is not required and it gets
#>     invalid quite often. A build date will be added to the package when
#>     you perform `R CMD build` on it.
#>    add a "URL" field to DESCRIPTION. It helps users find
#>     information about your package online. If your package does not
#>     have a homepage, add an URL to GitHub, or the CRAN package package
#>     page.
#>    add a "BugReports" field to DESCRIPTION, and point it to a
#>     bug tracker. Many online code hosting services provide bug trackers
#>     for free,,, etc.
#>    omit trailing semicolons from code lines. They are not
#>     needed and most R coding standards forbid them
#>     R/semicolons.R:4:30
#>     R/semicolons.R:5:29
#>     R/semicolons.R:9:38
#>    not import packages as a whole, as this can cause name
#>     clashes between the imported packages. Instead, import only the
#>     specific functions you need.
#> ────────────────────────────────────────────────────────────────────────────────