Lint select subdirectories in a package directory.
Arguments
- pkg_dir
String of path to package directory.
- shiny
Boolean of whether or not a
shiny
directory should also be lint. Defaults to the current directory.
Details
Will look for files in the following directories:
"R"
, "tests"
, and conditionally "inst/shiny"
if shiny
is TRUE
.
Examples
lintPkgDirs(
pkg_dir= system.file(package = "gDRstyle", "tst_pkgs", "dummy_pkg"))
#> Linting file: /usr/local/lib/R/site-library/gDRstyle/tst_pkgs/dummy_pkg/R/test.R
#> Linting file: /usr/local/lib/R/site-library/gDRstyle/tst_pkgs/dummy_pkg/tests/testthat.R
#> Linting file: /usr/local/lib/R/site-library/gDRstyle/tst_pkgs/dummy_pkg/tests/testthat/test-pkg.R
#> All files OK!