powered by
Check that no absolute paths are used (e.g. "/var", "C:\System", "~/docs").
absolute_path_linter(lax = TRUE)
Less stringent linting, leading to fewer false positives. If TRUE, only lint path strings, which
TRUE
contain at least two path elements, with one having at least two characters and
contain only alphanumeric chars (including UTF-8), spaces, and win32-allowed punctuation
best_practices, configurable, robustness
linters for a complete list of linters available in lintr.
nonportable_path_linter()
# will produce lints lint( text = 'R"--[/blah/file.txt]--"', linters = absolute_path_linter() ) # okay lint( text = 'R"(./blah)"', linters = absolute_path_linter() )
Run the code above in your browser using DataLab