absolute_path_linter {lintr} | R Documentation |
Check that no absolute paths are used (e.g. "/var", "C:\System", "~/docs").
absolute_path_linter(lax = TRUE)
lax |
Less stringent linting, leading to fewer false positives.
If
|
best_practices, configurable, robustness
linters for a complete list of linters available in lintr.
# Following examples use raw character constant syntax introduced in R 4.0.
# will produce lints
lint(
text = 'R"--[/blah/file.txt]--"',
linters = absolute_path_linter()
)
# okay
lint(
text = 'R"(./blah)"',
linters = absolute_path_linter()
)