View source: R/namespace_linter.R
namespace_linter | R Documentation |
Check for missing packages and symbols in namespace calls.
Note that using check_exports=TRUE
or check_nonexports=TRUE
will load packages used in user code so it could
potentially change the global state.
namespace_linter(check_exports = TRUE, check_nonexports = TRUE)
check_exports |
Check if |
check_nonexports |
Check if |
configurable, correctness, executing, robustness
linters for a complete list of linters available in lintr.
# will produce lints
lint(
text = "xyzxyz::sd(c(1, 2, 3))",
linters = namespace_linter()
)
lint(
text = "stats::ssd(c(1, 2, 3))",
linters = namespace_linter()
)
# okay
lint(
text = "stats::sd(c(1, 2, 3))",
linters = namespace_linter()
)
lint(
text = "stats::ssd(c(1, 2, 3))",
linters = namespace_linter(check_exports = FALSE)
)
lint(
text = "stats:::ssd(c(1, 2, 3))",
linters = namespace_linter(check_nonexports = FALSE)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.