我的包中的这个测试适用于devtools::test()
. 在线 Travis 构建也进展顺利。
test_that("Package style", {
lintr::expect_lint_free()
})
但是,devtools::check()
它失败了。错误信息是
invalid 'path' argument
Backtrace:
1. lintr::expect_lint_free()
2. lintr::lint_package(...)
3. base::normalizePath(path, mustWork = FALSE)
4. base::path.expand(path)
我在 Windows 上运行 R 版本 3.6.3 (2020-02-29),testthat 2.3.2 和 lintr 2.0.1。
我认为问题在于 lintr 不知道要 lintr 哪个文件。
有人可以向我指出这个问题的解决方案是什么吗?