lintr
lintr copied to clipboard
Extensions for system_file_linter to block '/' for robustness
Related: Prevent literals with /
or \
in them for file.path
and system.file
.
Should check path linters if they know system.file
.
Originally posted by @AshesITR in https://github.com/r-lib/lintr/issues/1006#issuecomment-1080359185
Also related: our PasteFilePathLinter()
from #884 which didn't make the 3.0.0 cut:
PasteFilePathLinter - Block usage of paste() with sep='/'
Although sep = "/"
in general paste()
calls could be okay, e.g. for constructing REST endpoint URLs which are not file paths imo.