Flags non-portable constructs that can break when a reviewer runs the code on
Windows, which is the FDA reviewer environment. Beyond the absolute paths that
assess_path_hygiene() already catches, this looks for shell-outs
(system()/system2()), forking (mclapply and friends, which do not work
on Windows), and POSIX locations (/dev/null, /tmp/). Returns evidence with
indicator_id = "R-REPRO-011".
Arguments
- path
Path to the submission's analysis code folder.
- ctx
A run context from
r4subcore::r4sub_run_context(). WhenNULLa default context is created from the folder name.- config
A configuration from
repro_config_default(). WhenNULLthe default configuration is used.
Examples
d <- file.path(tempdir(), "sub011")
dir.create(d, showWarnings = FALSE)
writeLines("x <- dplyr::filter(mtcars, mpg > 20)", file.path(d, "a.R"))
ev <- suppressMessages(assess_windows_reviewability(d))
ev$result
#> [1] "pass"